After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 78288 - gkb loads US keymap by default
gkb loads US keymap by default
Status: VERIFIED FIXED
Product: gnome-applets
Classification: Other
Component: keyboard indicator (gswitchit)
1.9x
Other Solaris
: High major
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
: 79284 81388 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-04-10 14:43 UTC by keelin.boyle
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
The proposed hotfix patch for this bug (1.67 KB, patch)
2002-05-10 14:52 UTC, Szabolcs Ban
none Details | Review
Proposed patch (2.58 KB, patch)
2002-05-28 10:34 UTC, Shivram U
none Details | Review
Proposed patch (1.71 KB, patch)
2002-05-30 14:22 UTC, Shivram U
none Details | Review

Description keelin.boyle 2002-04-10 14:43:56 UTC
Using beta3, gkb applet, version 1.98.0, on Solaris 8,

Adding applet to panel disables use of pipe symbol in terminal.

To Reproduce:

1) Open a terminal, type ls | grep anything.
2) Add the gkb applet to the panel.
3) Open another terminal, and again type ls | grep anything.

Pipe symbol key doesn't work.
Comment 1 Luis Villa 2002-04-10 22:14:20 UTC
Re-titling with what is probably more correct. I'm really not sure
there is a GNOME level solution for this, though.
Comment 2 keelin.boyle 2002-04-11 13:08:25 UTC
I consider this one quite a high priority fix, as after the applet is
added to the panel, the only solution is to reboot, not even removing
the applet and logging out and in again enables use of the pipe on
keyboard.
Comment 3 Luis Villa 2002-05-01 11:54:37 UTC
Right, but the fix is not in gkb- I /think/ it is in sun's
shipping/packaging of gkb. Anyone from gnome-applets care to
discuss/comment? Or should this be a build-time test?
Comment 4 keelin.boyle 2002-05-03 17:42:20 UTC
I think what is happening is, that when the gkb-keyboard-applet starts
it automatically loads in a US keyboard mapping without warning the
user, if users are on UK keyboards they have their pipe symbols moved
and other useful keys without warning.

It would be better if this action were disabled, and the applet
attempted to determine which keyboard mapping the user has when it
starts up and then load that one instead of default US. 
Comment 5 Kevin Vandersloot 2002-05-10 03:11:40 UTC
Putting on GNOME2 milestone though it may not get fixed. Perhaps the
easy solution is to not load the keymap on startup and let the user
change it to whatever he/she wants
Comment 6 Szabolcs Ban 2002-05-10 08:37:17 UTC
I plan to make a wizard what lauch at first start. I've got a working
glade now, I can make it soon.
Comment 7 Kevin Vandersloot 2002-05-10 14:34:22 UTC
A wizard is a major overkill. A simple dialog would work perfectly
fine. I don't think the applet should popup anything when added
though. It's also probably too late for these changes.

Shooby: can the applet query what the current keyboard is? Or can it
just not set the keyboard when first started? There's a UI/string
freeze beginning very soon, so we don't have much time to make changes.

Also see bug #80354 for a gui enhancement that might make it more
obvious for users how to setup the applet in the future.
Comment 8 Kevin Vandersloot 2002-05-10 14:37:02 UTC
*** Bug 79284 has been marked as a duplicate of this bug. ***
Comment 9 Szabolcs Ban 2002-05-10 14:51:32 UTC
I made a fast fix for this probem. Send me a negotiation or a fixed
version of this attached patch. This patch also needs a gkb.png in the
flag dir to be the default flag.
Comment 10 Szabolcs Ban 2002-05-10 14:52:52 UTC
Created attachment 8350 [details] [review]
The proposed hotfix patch for this bug
Comment 11 Kevin Vandersloot 2002-05-10 22:49:30 UTC
What does the patch do? I'm not sure I understand what changes you've 
made
Comment 12 Szabolcs Ban 2002-05-12 17:07:08 UTC
When the user runs this applet for the first time, GKB makes a
"default keymap" (~/.gkb_default.xmm, I know it's ughly a bit) for the
user from the current keyboard layout and loads it by default instead
of the US keymap. As I said it's a hotfix.
Comment 13 Kevin Vandersloot 2002-05-12 19:55:00 UTC
*** Bug 81388 has been marked as a duplicate of this bug. ***
Comment 14 Kevin Vandersloot 2002-05-12 20:01:49 UTC
Shooby: should the applet restore the default keyboard when exiting?
Comment 15 Szabolcs Ban 2002-05-13 07:36:41 UTC
Bruhu... somebody wants to remove my applet ;((((

OK, I think the idea is good. I gonna make it.
Comment 16 robert.kinsella 2002-05-24 14:03:17 UTC
This problem also exists on Solaris Intel but the consequences of the
US keyboard being selected leaves the user with a more or less
disfunctional keyboard, all numeric keys and the <CR> do not work.
Comment 17 Shivram U 2002-05-28 10:33:38 UTC
I have a problem that ~/.gkb_default.xmm doesnt work on my Solaris 
m/c. On adding the gkb-applet to the panel, i get the following error 
 "The keymap switching command returned with error!".
  On further inspection, i found that the ~/.gkb_default.xmm file is 
not being generated.

Attaching a patch which fixes this. What the patch does is it gets 
the user home dir by calling g_get_home_dir () rather than using ~/

Comment 18 Shivram U 2002-05-28 10:34:27 UTC
Created attachment 8774 [details] [review]
Proposed patch
Comment 19 Shivram U 2002-05-28 13:21:22 UTC
The user can delete the default keymap, but there is no way to add it 
back. This can be a problem. Maybe the user should not be allowed to 
delete the default keymap.
Comment 20 Kevin Vandersloot 2002-05-29 21:53:34 UTC
Shivram: I agree that the user probably should not be able to delete 
the default.

Shooby: what do you think? 
Comment 21 Szabolcs Ban 2002-05-30 08:50:53 UTC
Agree. Will this produce uncompatibility for any supported platform? I
think on Unix platforms this will be ok.
Comment 22 Shivram U 2002-05-30 12:58:44 UTC
So how do we do this:
Do we popup a dialog if the user tries to delete the default keymap ?
Do we disable the Delete button in the preferences dialog if the 
default keymap is selected ?
  I thought disabling the Delete button should do it. Maybe the Edit 
button should be disabled too.

Shooby: If disabling the buttons is ok with you i can make the 
changes.
Comment 23 Shivram U 2002-05-30 14:21:44 UTC
Attaching a patch anyway :-)

The patch disables the Delete and Edit buttons in the preferences 
dialog if the default keymap is selected.

The patch also restores the default keymap when the applet is removed 
from the panel.
Comment 24 Shivram U 2002-05-30 14:22:50 UTC
Created attachment 8851 [details] [review]
Proposed patch
Comment 25 Szabolcs Ban 2002-05-30 14:32:29 UTC
No way! You don't understand my program :-(
I don't want to keep the default keymap.  I do not use that keymap
entry when restoring the original keyboard layout. User can make a
different layout combination, what do not contains the default map.
I use 3 keymap what is not the X's default keymap, and I don't want to
switch between four keymap just because there is a fourth what is 
unusable for me.
Why do you want to keep that entry? It's just because those users who
wants to use this applet with good defaults.
Comment 26 Szabolcs Ban 2002-05-30 14:43:01 UTC
The default xmodmap file will not be deleted when user press the
Delete button. I plan to catch the exit of the applet and make a 
system("xmodmap ~/.gkb_default.xmm"); simply. I have problems because
applet's destroy is not called as I recognised, that's why I didn't
fix this problem weeks ago. But when I will find the way to catch the
applet removal event I will be able to reset the default keymap after
user removes the applet from the panel.
Comment 27 Shivram U 2002-05-31 06:46:41 UTC
True the default keymap file is not being deleted and default keymap 
can be restored on exit. But consider the following case

 1. Using the xmodmap command i have a custom keymap setting.
 1. On loading the applet, this keymap setting would become my 
default keymap and is kept in the .gkb_keymap.xmm file.
 2. Now i click on preferences and delete the default keymap entry.
 3. Now if i want to revert back to my default keymap, the only way i 
can get back my original keymap is by running the xmodmap 
~/.gkb_keymap.xmm command or by removing the applet (when the code 
for restoring the keymap is added )

Maybe the user should be given an option to somehow add back the 
default keymap to the layout.
Comment 28 Szabolcs Ban 2002-05-31 08:36:58 UTC
If it's OK I could make a keyprop file for this default layout with
International settings. In the help there will be a section for users
who want to use special keymaps.

Can I commit the keyprop file?
Comment 29 Shivram U 2002-05-31 09:12:06 UTC
Nice idea Shooby. This would clear up most things. The only thing 
then left would be restoring the default keymap  on exit.
Shooby, doesnt adding the code for restoring in gkb_destroy () work. 
Works fine for me on my machine. 
Hmm.. may be not if more than one instance of the applet is running 
and if one is removed.
Ofcourse if the applet is killed explicity then nothing much can be 
done.
Is there anyway we can execute the system() call during factory 
shutdown ?
Comment 30 robert.kinsella 2002-05-31 12:52:59 UTC
(Adding Sunray error)
Solaris sparc 8 update 4, sunray server, gnome-2.0 prebeta1
On sunray server the selection of the US keymap messes up all keys
except the numeric keys (i.e. 01234 etc.) on the keyboard.
Comment 31 Shane O'Connor 2002-06-01 14:49:10 UTC
tested build built from source 31st may on Intel Solaris - 

the gkb applet is working fine - default is "gkb" if user clicks on
applet it changes to "us" and there are NO adverse effects when "us"
keyboard is selected.
Comment 32 Shivram U 2002-06-06 07:09:25 UTC
Robert: One of the reasons why selection of US keymap fails could be 
that the keyboard for the Sunray server is a Sun USB keyboard. Could 
you please verify this by  "kbd -t" command. I faced the same problem 
on a SunBlade 100 machine with a Sun USB keyboard. The appropriate 
keymaps for USB keyboards are available. 
You can add that from the preferences dialog.
Add->English->United States->US Sun USB keyboard.
And selecting this keymap should work fine.
Comment 33 Shivram U 2002-06-06 07:12:31 UTC
Shooby: Would you be committing the keyprop.in file for the default 
layout? If you need anything to be done, i'll be glad to help.
Comment 34 Shane O'Connor 2002-06-06 09:19:31 UTC
just noticed that the gkb applet causes the "Return" key to lose its
function on a Dell Optiplex GX110 machine - the function of "carriage
return" is moved from the "Return" key to the "#" (hash) key.

This is only present on the Dell Optiplex GX110 - I also tried it on a
gateway 2000 machine with no problems...


What would cause this? What machine specific features does gkb applet
depend on?
Comment 35 Szabolcs Ban 2002-06-06 12:21:49 UTC
Committed the Default.keymap.in and Makefile.am to descs dir. Please 
try out under solaris and commit to descs.sun if works.
Comment 36 Shivram U 2002-06-06 13:19:06 UTC
I have tried out the Default.keyprop file under Solaris. It works 
fine. 
But i had this little doubt in my mind. The name and label is 
different from the Default keymap we first load.
The name is "Original keymap" and label is "dvr" in the file.
The default keymap we load has "Gnome keyboard default" as the name 
and "gkb" as the label.
Comment 37 Szabolcs Ban 2002-06-10 13:59:30 UTC
FIX in CVS, please check and make another note or close the bug
Comment 38 Shane O'Connor 2002-06-13 10:13:14 UTC
waiting for build....:)
Comment 39 Shane O'Connor 2002-06-28 17:25:57 UTC
this was tested on a Dell Optiplex GX110 with solaris and a gnome
build from CVS 19th June. 

The problem is still there although the enter key functionality has
now moved to the \ key.

Comment 40 Kevin Vandersloot 2002-06-28 21:29:41 UTC
Hey Shane: why don't we close this bug and open a new one for the
remaining issues? I think this bug has wandered quite a bit. I'm not
clear anymore as to what the problem is now.
Comment 41 Shane O'Connor 2002-07-02 14:00:57 UTC
Kevin: that's ok with me - i'll close this as original problem fixed,
new bug opened for intel specific problem...



opening a new bug #87124
Comment 42 Shane O'Connor 2002-07-02 14:02:19 UTC
fix verified (pipe symbol works)
Comment 43 Shane O'Connor 2002-07-02 14:03:00 UTC
closing