xbindkeys-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xbindkeys-devel] Re: Question about xbindkeys and keyboard press & rele


From: Philippe Brochard
Subject: [Xbindkeys-devel] Re: Question about xbindkeys and keyboard press & release
Date: Sat, 27 Nov 2010 23:43:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Santiago Romero writes:

>   Before using xbindkeys, can't you have something working with xmodmap.
>   In particular, to simulate the first mouse button, you can use something
>   like this:
>
>   $ xmodmap -e "keycode 133 =  Pointer_Button1"
>
>   And if this is working, you can put the part after the -e option in your
>   ~/.xmodmap.
>
>   Please, tell me if this works for you. If not, we can have a look at
>   xdotool+xbindkeys.
>   Philippe
>
> Hi, and thanks for answering :-)
> This is what "xev" shows when I press the "windows" key:
> KeyPress event, serial 36, synthetic NO, window 0x2000001,
>  root 0x105, subw 0x0, time 28012862, (95,162), root:(131,186),
>  state 0x0, keycode 133 (keysym 0xfee9, Pointer_Button1), same_screen
                                          ^^^^^^^^^^^^^^^
                                    all is ok -|
> YES,
>  XKeysymToKeycode returns keycode: 125
>  XLookupString gives 0 bytes: 
>  XmbLookupString gives 0 bytes: 
>  XFilterEvent returns: False
>  Showkeys shows the keycode 125, instead of 133:
> address@hidden:~]$ sudo showkey
> kb mode was RAW
> [ if you are trying this under X, it might not work
> since the X server is also reading /dev/console ]
> press any key (program terminates 10s after last keypress)...
> keycode  28 release
> keycode 125 press
> keycode 125 release
> keycode 125 press
> keycode 125 release
> I've tested both:
> address@hidden:~]$ history | grep Pointer
>   501  xmodmap -e "keycode 133 =  Pointer_Button1"
>   510  xmodmap -e "keycode 125 =  Pointer_Button1"
>  None of the above commands made the X server to detect the windows key
> press as a mouse click :-(
>
Oops, sorry. You have to enable mousekeys to use this.

Add those lines on your ~/.xinitrc, ~/.Xclients, ~/.xsession,
whatever...:

--------------------------------------------------
xkbset m
xkbset exp =m
--------------------------------------------------

Indeed, you'll have to install xkbset if this is not already the case.

You can also use a line like this one:

keycode 133 =  Pointer_Button2 Pointer_EnableKeys

then pressing the keys Shift+Windows will enable/disable mousekeys.


>  I'm praying that xbindkeysrc can be used to solve with this
>  "problem".
>
There is really no need to use xbindkeys for this task!
I use this xmodmap method every day for the middle mouse button on a
laptop with a touchpad. And it works great for me.

>  Thanks
>
Tell me if this works for you.

Philippe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]