(with Ubuntu 11.10)
I found an old unanswered thread that has sent me down this path. Almost solved it straight away but there is something weird about startup that is failing.
Here's the problem I'm trying to solve:
Since i quite frequently need to enter numbers in a 1e5 format I want to remap the numlock key to e (so that i can type one-handedly).
However, i somehow need to activate the number block, so i decided to map Num_Lock on the Scroll_Lock key.
I have a startup application entry I wrote, that just calls xmodmap ~/.Xmodmap
in it, I put the following:
...then you need to set the numlock in the on state by default if you like in the keyboard preferences. Or turn it on/off when you like by pressing Scroll Lock (this will also turn on the scroll lock)remove Lock = Num_Lock
keysym Num_Lock = Scroll_Lock
keysym Scroll_Lock = Num_Lock
add mod2 = Num_Lock
keycode 77 = e
The problem with that is that the numlock key will still turn off the numlock setting if it was on (it does both, outputs the letter and clears the setting). It happens also to not work the other way -- from the off state it stays off. That's odd in itself but, I need to get rid of the behavior. And I sort of have a solution.
Going to the commandline and running:
will fix it. So I should just add "remove mod2 = e" to my start up script, I would think. But adding that line to .Xmodmap does not fix it.xmodmap -e "remove mod2 = e"
I know the startup script is working because I get the "e" assigned to the Numlock key. So something is changing the mod2 setting *after* my startup script.
How can I get my startup application to run *after* gnome has finished changing my keyboard settings during startup?
I think that could be considered a bug. Shouldn't anything that happens in a custom startup script happen after any other changes made by the windowing system?



Adv Reply


Bookmarks