[eclipse-devel] Ping and a question about modifier keys

Iban HATCHONDO hatchond at yahoo.fr
Tue Nov 28 09:28:47 UTC 2006


Hi all,

thanks for comming back on this thread,
At the time Xavier has posted his question, I didn't realize we were having a bug in keyboard::make-modifier-mask-table and were missing a point with X keyboard handling.

Can you please try the following (it seems to be working on my side.)

in lib/clx-ext/keysyms.lisp

replace definition of make-modifier-mask-table for the following one:

(defun make-modifier-mask-table (disp)
   (loop with map = '(:any #x8000)
            with keysyms-per-keycode = (array-dimension (xlib:keyboard-mapping disp) 1)
            for mods in (multiple-value-list (xlib:modifier-mapping disp))
            for i = 1 then (* 2 i) do
            (loop for mod in mods
                     for key-name = (modcode->keyname disp mod keysyms-per-keycode)
                     for prec = (getf map key-name) do
                    (setf (getf map key-name) (logior (if (numberp prec) prec 0) i)))
            finally (return map)))

and add this new function:

(defun modcode->keyname (disp keycode keysyms-per-keycode)
   "Returns the keyword that named the specified modifier keycode."
   ;; This has been created to deal with X keyboard wierd mapping.
   ;; For some reasons, for few keys the first keysym in the list, 
   ;; modifiers keysym in particular, does not exists. So lets try
   ;; to resolve it anyway looking further in the array.
   (loop for i from 0 below keysyms-per-keycode
            for keysym = (xlib:keycode->keysym disp keycode i)
            when (> keysym 0) do (return (keysym->keyname keysym))))


For info, here is now the content of  kb::*modifier->modifier-mask*

(:ISO-LEVEL3-SHIFT 128
 :MODE-SWITCH 128
 :HYPER-LEFT 64
 :SUPER-LEFT 64
 :NUM-LOCK 16
 :META-LEFT 8
 :ALT-LEFT 8
 :CONTROL-RIGHT 4
 :CONTROL-LEFT 4
 :CAPS-LOCK 2
 :SHIFT-RIGHT 1
 :SHIFT-LEFT 1
 :ANY 32768)

Cheers,
Iban.

----- Message d'origine ----
De : Ralf Mattes <rm at seid-online.de>
À : eclipse-wm <eclipse-devel at common-lisp.net>
Envoyé le : Lundi, 27 Novembre 2006, 16h21mn 08s
Objet : [eclipse-devel] Ping and a question about modifier keys

Hello list, 
        
        looking at the archives i'm not shure anybody listens :-/
        I'd like to pick up a thread started by Xavier Maillard last
        year:
        
         I try to use my 'Microsoft'-Key as the main key to interact
        with eclipse.
        That key is known it X as the Super_L key (according to xev). I
        tried to 
        create bindings like this:
        
              (define-key-combo :switch-screen-left
                  :keys '(:LEFT)
                  :modifiers '(:SUPER-LEFT))
        
         but eclipse refuses to acccept the modifier. The same happens
        when i
         asign META to the MS-Key.
         
         Looking at *modifier->modifier-mask* i get:
        
         EWMI> kb::*modifier->modifier-mask*
        (:ISO-LEVEL3-SHIFT 256 
         :MODE-SWITCH 128
         :NUM-LOCK 16
          NIL 144 
         :ALT-LEFT 8
         :CONTROL-LEFT 4 
         :CONTROL-RIGHT 4 
         :CAPS-LOCK 4 
         :SHIFT-RIGHT 1 
         :SHIFT-LEFT 1
         :ANY 32768)
        
        with both META and SUPER_L missing. Any ideas?
        
         Cheers, Ralf Mattes
        
        
        
        
_______________________________________________
eclipse-devel site list
eclipse-devel at common-lisp.net
http://common-lisp.net/mailman/listinfo/eclipse-devel





	

	
		
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com



More information about the eclipse-devel mailing list