Dynamic binding of keyname/keysym.

Erik Enge erik at nittin.net
Fri Feb 28 08:30:01 UTC 2003


I use Dvorak as my keyboard layout (as opposed to Qwerty or Azerty).

Consider the following piece of code:

   (define-key-combo :previous-workspace
       :keys '(:p)
       :modifiers '(:and :ALT-LEFT :CONTROL-LEFT)
       :fun (action
             (:press (change-vscreen (root-vscreens *root*) #'+))
             ()))

When I start up Eclipse initially, my keyboard is Qwerty.  Pressing 
A-C-p gives me the previous-workspace.  Then I load my .Xmodmap file 
(using `xmodmap ~/.Xmodmap`).  Qwerty-P is now Dvorak-L and Dvorak-P is 
now Qwerty-R.  So, when I now hit A-C-p, what really is seen by Eclipse 
is A-C-r.

I've looked in lib/clx-ext/keysymdef.lisp and it seems that all 
keysyms->keynames and vice versa are hardcoded here.  I haven't spent 
much time with the code, so I don't fully understand what INIT-KEYBOARD 
does - it might do what I need to only I can't see it.

How can I tell Eclipse: "Listen, I just ran xmodmap and redefined all 
keys, why don't you look at how it's bound right now and rebind all your 
internal bindings?"

The strange thing is that this works as expected:

   xmodmap -e "remove Lock = Caps_Lock"
   xmodmap -e "keysym Caps_Lock = Control_L"
   xmodmap -e "add Control = Control_L"

Eclipse now sees my Caps_Lock as my Control_L.

Again, if I just get the description of how to make this work I can 
probably write it myself (if any changes needs to be made to the code).

Thanks for any pointers,

Erik.




More information about the eclipse-devel mailing list