You are not logged in.
Well, not keyboard per se but my *wireless presentation remote* that has four buttons that emmit PgUp, PgDown, Esc and… "b"(I wonder why?).
I'd like to *remap* them as needed, but I wouldn't(couldn't?) want to just remap "b" in all of X.
I can `cat` it, parse it and issue `xdotool key something` as I see fit, but it will still send it to X too, so perhaps I can just disable it(I guess blacklist through Xorg.conf).
1. Any other ways of approaching it?
2. I'm curious why it even sends it to X? How does that work roughly?
Last edited by sie (2017-01-08 18:07:49)
a & ☭
Offline
Forgot to mention, I can parse its output from /dev/input/'s device. Its output is exactly like that of a /dev/tty when the same keys are pressed.
a & ☭
Offline
Are you sure this can't be toggled on the device? I have a Targus presentation remote which emits those exact same symbols in one mode, but it has a switch for another mode which changes the keysyms to something I can't recall, but I found much more usefull.
Those key symbols sound like the remote is in a "presentation mode".
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
It's a cheap and dumb device with five buttons(one for pointing a laser).
Example of catting the input device: https://asciinema.org/a/cjqya6hexwfv7cswq25e1bn02
a & ☭
Offline
Last time I tried remapping a wireless keypad I ended up
writing down all keycodes with xev,
disabling the normal key functions,
xinput disable "keyboard:<id>"
connecting the device to an actkbd conf,
actkbd -s --device /dev/input/by-id/<id> --config ~/keys.conf
and running xdotool from that conf.
82:key::xdotool key BackSpace
82:rep::xdotool key BackSpace
82+96:key::xdotool key Ctrl+BackSpace
82+96:rep::xdotool key Ctrl+BackSpace
...
(this is probably not the best way of doing it, but it worked okay)
Offline
You might be able to create a custom keymap and set it using setxkbmap to the specific keyboard id.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Well, not keyboard per se but my *wireless presentation remote* that has four buttons that emmit PgUp, PgDown, Esc and… "b"(I wonder why?).?
The 'b' will blank presentation in powerpoint and libreoffice impress.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
You might be able to create a custom keymap and set it using setxkbmap to the specific keyboard id.
Yeah, I did this and it sorta worked. I had already made a custom xkbmap, so I had a head start with this.
1.1. To detect the id of your device, one may use:
diff <(xinput) <(sleep 3; xinput) # plug the receiver while sleep is waiting
1.2. So below you can see my xkbmap file for this remote. (notice the -i 25) that applies it to that device only.
1.3. Xbindkeys though WON'T read it as XF86AudioLowerVolume, though, so this is useful only for mpv/mplayer/vlc.
2. I guess the other good solution is then flurick's, which I'm about to try, though, from the looks of it, I'm already certain it works.
Because of 1. and 2., marking this as solved.
// Info at /usr/share/X11/xkb/symbols/lv
//
// For the product:
// Name: RF 2 4GHz Wireless Presenter USB Remote Control Presentation Mouse Pointer Black
// Seller: niceol at ebay.
//
// setxkbmap xkbmap-remote -print | xkbcomp -I.. - $DISPLAY -i 25
// NOTE: This file should be within a directory called "symbols" and
// -I.. points to the .. relative to symbols directory.
partial alphanumeric_keys modifier_keys
xkb_symbols "media_common" {
// top row
key <PGUP> {[XF86AudioLowerVolume]};
key <PGDN> {[XF86AudioRaiseVolume]};
// bottom row with the left btn alternating between ESC and F5
key <ESC> {[asciitilde]};
key <FK05> {[asciitilde]};
key <AB05> {[space]};
};
REMARK about the remote itself: clicking one of the buttons makes the hardware send keyboard events alternating between Escape, F5 and Super_L key. Haha, such great design.
Last edited by sie (2017-01-08 18:11:55)
a & ☭
Offline