Re : Ping and a question about modifier keys

Iban HATCHONDO <[email protected]> Tue, 28 Nov 2006 09:28:47 +0000 (GMT)
Newsgroups gmane.comp.window-managers.eclipse
Message-ID <[email protected]>
Hi all,=0A=0Athanks for comming back on this thread,=0AAt the time Xavier h=
as 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.=
=0A=0ACan you please try the following (it seems to be working on my side.)=
=0A=0Ain lib/clx-ext/keysyms.lisp=0A=0Areplace definition of make-modifier-=
mask-table for the following one:=0A=0A(defun make-modifier-mask-table (dis=
p)=0A   (loop with map =3D '(:any #x8000)=0A            with keysyms-per-ke=
ycode =3D (array-dimension (xlib:keyboard-mapping disp) 1)=0A            fo=
r mods in (multiple-value-list (xlib:modifier-mapping disp))=0A            =
for i =3D 1 then (* 2 i) do=0A            (loop for mod in mods=0A         =
            for key-name =3D (modcode->keyname disp mod keysyms-per-keycode=
)=0A                     for prec =3D (getf map key-name) do=0A            =
        (setf (getf map key-name) (logior (if (numberp prec) prec 0) i)))=
=0A            finally (return map)))=0A=0Aand add this new function:=0A=0A=
(defun modcode->keyname (disp keycode keysyms-per-keycode)=0A   "Returns th=
e keyword that named the specified modifier keycode."=0A   ;; This has been=
 created to deal with X keyboard wierd mapping.=0A   ;; For some reasons, f=
or few keys the first keysym in the list, =0A   ;; modifiers keysym in part=
icular, does not exists. So lets try=0A   ;; to resolve it anyway looking f=
urther in the array.=0A   (loop for i from 0 below keysyms-per-keycode=0A  =
          for keysym =3D (xlib:keycode->keysym disp keycode i)=0A          =
  when (> keysym 0) do (return (keysym->keyname keysym))))=0A=0A=0AFor info=
, here is now the content of  kb::*modifier->modifier-mask*=0A=0A(:ISO-LEVE=
L3-SHIFT 128=0A :MODE-SWITCH 128=0A :HYPER-LEFT 64=0A :SUPER-LEFT 64=0A :NU=
M-LOCK 16=0A :META-LEFT 8=0A :ALT-LEFT 8=0A :CONTROL-RIGHT 4=0A :CONTROL-LE=
FT 4=0A :CAPS-LOCK 2=0A :SHIFT-RIGHT 1=0A :SHIFT-LEFT 1=0A :ANY 32768)=0A=
=0ACheers,=0AIban.=0A=0A----- Message d'origine ----=0ADe : Ralf Mattes <rm=
@seid-online.de>=0A=C0 : eclipse-wm <[email protected]>=0AEnvoy=
=E9 le : Lundi, 27 Novembre 2006, 16h21mn 08s=0AObjet : [eclipse-devel] Pin=
g and a question about modifier keys=0A=0AHello list, =0A        =0A       =
 looking at the archives i'm not shure anybody listens :-/=0A        I'd li=
ke to pick up a thread started by Xavier Maillard last=0A        year:=0A  =
      =0A         I try to use my 'Microsoft'-Key as the main key to intera=
ct=0A        with eclipse.=0A        That key is known it X as the Super_L =
key (according to xev). I=0A        tried to =0A        create bindings lik=
e this:=0A        =0A              (define-key-combo :switch-screen-left=0A=
                  :keys '(:LEFT)=0A                  :modifiers '(:SUPER-LE=
FT))=0A        =0A         but eclipse refuses to acccept the modifier. The=
 same happens=0A        when i=0A         asign META to the MS-Key.=0A     =
    =0A         Looking at *modifier->modifier-mask* i get:=0A        =0A  =
       EWMI> kb::*modifier->modifier-mask*=0A        (:ISO-LEVEL3-SHIFT 256=
 =0A         :MODE-SWITCH 128=0A         :NUM-LOCK 16=0A          NIL 144 =
=0A         :ALT-LEFT 8=0A         :CONTROL-LEFT 4 =0A         :CONTROL-RIG=
HT 4 =0A         :CAPS-LOCK 4 =0A         :SHIFT-RIGHT 1 =0A         :SHIFT=
-LEFT 1=0A         :ANY 32768)=0A        =0A        with both META and SUPE=
R_L missing. Any ideas?=0A        =0A         Cheers, Ralf Mattes=0A       =
 =0A        =0A        =0A        =0A______________________________________=
_________=0Aeclipse-devel site [email protected]=0Ahttp:=
//common-lisp.net/mailman/listinfo/eclipse-devel=0A=0A=0A=0A=0A=0A=09=0A=0A=
=09=0A=09=09=0A____________________________________________________________=
_______________ =0AD=E9couvrez une nouvelle fa=E7on d'obtenir des r=E9ponse=
s =E0 toutes vos questions ! =0AProfitez des connaissances, des opinions et=
 des exp=E9riences des internautes sur Yahoo! Questions/R=E9ponses =0Ahttp:=
//fr.answers.yahoo.com
_______________________________________________
eclipse-devel site list
[email protected]
http://common-lisp.net/mailman/listinfo/eclipse-devel