Extra keyboard

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Extra keyboard

Jean-Baptiste Mestelan
Hello,


I have a USB numeric keypad lying about, and would like to use its
keys as special shortcuts (like, its Num-6 could simulate
XF86AudioNext...).
How do I tell its key strokes apart from those of the main keyboard?
Is this done at X level?
Would the helpful people on this list provide some pointers, or set me started?

Thanks for attention.

* FWIW, here is dmesg:
[81553.409035] input: USB KB USB KB as
/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.4/3-3.4:1.0/0003:1241:1503.0006/input/input31
[81553.409193] hid-generic 0003:1241:1503.0006: input,hidraw2: USB HID
v1.10 Keyboard [USB KB USB KB] on usb-0000:00:14.0-3.4/input0
_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Extra keyboard

Brandon Allbery
On Wed, May 6, 2015 at 1:46 AM, Jean-Baptiste Mestelan <[hidden email]> wrote:
I have a USB numeric keypad lying about, and would like to use its
keys as special shortcuts (like, its Num-6 could simulate
XF86AudioNext...).
How do I tell its key strokes apart from those of the main keyboard?
Is this done at X level?
Would the helpful people on this list provide some pointers, or set me started?

You'll need to use the XInput extension (x11-xinput package), as X11 core only understands a single keyboard so by default all system keyboards are treated identically and their events mixed into a single event stream.

--
brandon s allbery kf8nh                               sine nomine associates
[hidden email]                                  [hidden email]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Extra keyboard

Jean-Baptiste Mestelan


2015-05-06 15:27 GMT+02:00 Brandon Allbery <[hidden email]>:

You'll need to use the XInput extension (x11-xinput package), as X11 core only understands a single keyboard so by default all system keyboards are treated identically and their events mixed into a single event stream.

Many thanks, Brandon; looking into that now.

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Extra keyboard

Daniel Wagner
In reply to this post by Jean-Baptiste Mestelan
Just in case the question was more specific than it needed to be, it's possible the numeric keypad reports different keys than the "number keys" at the top of your normal keyboard anyway. X distinguishes between xK_6 and xK_KP_6. So if you don't normally use the keypad on your main keyboard, this can be an option.

~d

On Tue, May 5, 2015 at 10:46 PM, Jean-Baptiste Mestelan <[hidden email]> wrote:
Hello,


I have a USB numeric keypad lying about, and would like to use its
keys as special shortcuts (like, its Num-6 could simulate
XF86AudioNext...).
How do I tell its key strokes apart from those of the main keyboard?
Is this done at X level?
Would the helpful people on this list provide some pointers, or set me started?

Thanks for attention.

* FWIW, here is dmesg:
[81553.409035] input: USB KB USB KB as
/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.4/3-3.4:1.0/0003:1241:1503.0006/input/input31
[81553.409193] hid-generic 0003:1241:1503.0006: input,hidraw2: USB HID
v1.10 Keyboard [USB KB USB KB] on usb-0000:00:14.0-3.4/input0
_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad


_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Extra keyboard

Jean-Baptiste Mestelan
2015-05-18 2:12 GMT+02:00 Daniel Wagner <[hidden email]>:
> Just in case the question was more specific than it needed to be, it's
> possible the numeric keypad reports different keys than the "number keys" at
> the top of your normal keyboard anyway. X distinguishes between xK_6 and
> xK_KP_6. So if you don't normally use the keypad on your main keyboard, this
> can be an option.

Many thanks, Daniel, for your notice.
You are quite right that my numeric keypad reports distinct keys, and
I should have realized that, since they do not toggle workspaces.
So i might even get away with a single keyboard.

Thanks again (and sorry for the late reply).
_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad