Re: Re : Ping and a question about modifier keys

Ralf Mattes <[email protected]> Tue, 28 Nov 2006 11:37:06 +0100
Newsgroups gmane.comp.window-managers.eclipse
Message-ID <[email protected]>
On Tue, 2006-11-28 at 09:28 +0000, Iban HATCHONDO wrote:
> Hi all,

Hi Iban,

BINGO - everything works as expected now. Now eclipse will be even more
useful to me. Thanks for your work and that quick fix.

 Cheers RalfD



> thanks for comming back on this thread,
> At the time Xavier has posted his question, I didn't realize we were havi=
ng a bug in keyboard::make-modifier-mask-table and were missing a point wit=
h X keyboard handling.
>=20
> Can you please try the following (it seems to be working on my side.)
>=20
> in lib/clx-ext/keysyms.lisp
>=20
> replace definition of make-modifier-mask-table for the following one:
>=20
> (defun make-modifier-mask-table (disp)
>    (loop with map =3D '(:any #x8000)
>             with keysyms-per-keycode =3D (array-dimension (xlib:keyboard-=
mapping disp) 1)
>             for mods in (multiple-value-list (xlib:modifier-mapping disp)=
)
>             for i =3D 1 then (* 2 i) do
>             (loop for mod in mods
>                      for key-name =3D (modcode->keyname disp mod keysyms-=
per-keycode)
>                      for prec =3D (getf map key-name) do
>                     (setf (getf map key-name) (logior (if (numberp prec) =
prec 0) i)))
>             finally (return map)))
>=20
> and add this new function:
>=20
> (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,=20
>    ;; 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 =3D (xlib:keycode->keysym disp keycode i)
>             when (> keysym 0) do (return (keysym->keyname keysym))))
>=20
>=20
> For info, here is now the content of  kb::*modifier->modifier-mask*
>=20
> (: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)
>=20
> Cheers,
> Iban.
>=20
> ----- Message d'origine ----
> De : Ralf Mattes <[email protected]>
> =C3=80 : eclipse-wm <[email protected]>
> Envoy=C3=A9 le : Lundi, 27 Novembre 2006, 16h21mn 08s
> Objet : [eclipse-devel] Ping and a question about modifier keys
>=20
> Hello list,=20
>        =20
>         looking at the archives i'm not shure anybody listens :-/
>         I'd like to pick up a thread started by Xavier Maillard last
>         year:
>        =20
>          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=20
>         create bindings like this:
>        =20
>               (define-key-combo :switch-screen-left
>                   :keys '(:LEFT)
>                   :modifiers '(:SUPER-LEFT))
>        =20
>          but eclipse refuses to acccept the modifier. The same happens
>         when i
>          asign META to the MS-Key.
>         =20
>          Looking at *modifier->modifier-mask* i get:
>        =20
>          EWMI> kb::*modifier->modifier-mask*
>         (:ISO-LEVEL3-SHIFT 256=20
>          :MODE-SWITCH 128
>          :NUM-LOCK 16
>           NIL 144=20
>          :ALT-LEFT 8
>          :CONTROL-LEFT 4=20
>          :CONTROL-RIGHT 4=20
>          :CAPS-LOCK 4=20
>          :SHIFT-RIGHT 1=20
>          :SHIFT-LEFT 1
>          :ANY 32768)
>        =20
>         with both META and SUPER_L missing. Any ideas?
>        =20
>          Cheers, Ralf Mattes
>        =20
>        =20
>        =20
>        =20
> _______________________________________________
> eclipse-devel site list
> [email protected]
> http://common-lisp.net/mailman/listinfo/eclipse-devel
>=20
>=20
>=20
>=20
>=20
> =09
>=20
> =09
> 	=09
> _________________________________________________________________________=
__=20
> D=C3=A9couvrez une nouvelle fa=C3=A7on d'obtenir des r=C3=A9ponses =C3=A0=
 toutes vos questions !=20
> Profitez des connaissances, des opinions et des exp=C3=A9riences des inte=
rnautes sur Yahoo! Questions/R=C3=A9ponses=20
> http://fr.answers.yahoo.com
_______________________________________________
eclipse-devel site list
[email protected]
http://common-lisp.net/mailman/listinfo/eclipse-devel