keyboard - How to enable special key - Ask Ubuntu
i have wacom cintiq 24hd tablet/screen has several sets of buttons. of them work fine [edit: , configurable xsetwacom], there's 1 set of buttons (touch buttons, actually) on top of screen won't register in ubuntu gui stack.
picture of buttons in question
take leftmost of 3 buttons, 1 labeled i
. if press it, nothing happens. if use xev
, button not trigger output (as opposed working buttons), both sudo showkey
, sudo evtest
indeed show button registers in kernel (i suppose). i've identified keycode 202
:
% sudo evtest /dev/input/event4 input driver version 1.0.1 input device id: bus 0x3 vendor 0x56a product 0xf4 version 0x110 input device name: "wacom cintiq 24hd pad" supported events: event type 0 (ev_syn) event type 1 (ev_key) event code 148 (key_prog1) event code 149 (key_prog2) event code 202 (key_prog3) event code 256 (btn_0) event code 257 (btn_1) event code 258 (btn_2) event code 259 (btn_3) event code 260 (btn_4) event code 261 (btn_5) event code 262 (btn_6) event code 263 (btn_7) event code 264 (btn_8) (output trimmed) event: time 1477672672.059563, type 1 (ev_key), code 202 (key_prog3), value 1 event: time 1477672672.059563, type 3 (ev_abs), code 40 (abs_misc), value 15 event: time 1477672672.059563, -------------- syn_report ------------ event: time 1477672672.291614, type 1 (ev_key), code 202 (key_prog3), value 0 event: time 1477672672.291614, type 3 (ev_abs), code 40 (abs_misc), value 0 event: time 1477672672.291614, -------------- syn_report ------------
showkey
agrees evtest
keycode 202
:
% sudo showkey -k kb mode ?unknown? [ if trying under x, might not work since x server reading /dev/console ] press key (program terminates 10s after last keypress)... keycode 28 release keycode 202 press keycode 202 release
however, want use button something, if try temporarily assign button key 'a' testing purposes, not seem work.
xmodmap -e "keycode 202 = a"
no 'a' output if press button when in, say, terminal emulator.
am doing wrong xmodmap, or there other tool can use in order make stuff happen when press button? want button trigger script, if can indirectly remapping button other key modifiers, that's great. right don't know try next.
use xsetwacom:
http://linuxwacom.sourceforge.net/wiki/index.php/tablet_configuration
(see "man xsetwacom" too)
find device with
xsetwacom list
example output:
wacom dtk2241 pad pad id: 12 type: pad wacom dtk2241 pen stylus id: 13 type: stylus wacom dtk2241 pen eraser id: 14 type: eraser
my device dtk2241 i'll use example below:
xsetwacom -s "wacom dtk2241 pad pad"
then pad device list available buttons with:
xsetwacom -s "wacom dtk2241 pad pad"
example output:
xsetwacom set "wacom dtk2241 pad pad" "button" "1" "button +1 " xsetwacom set "wacom dtk2241 pad pad" "button" "2" "+2 " xsetwacom set "wacom dtk2241 pad pad" "button" "3" "+3 " xsetwacom set "wacom dtk2241 pad pad" "button" "8" "+8 " xsetwacom set "wacom dtk2241 pad pad" "button" "9" "+9 " xsetwacom set "wacom dtk2241 pad pad" "button" "10" "+10 " ....
then set button, example:
xsetwacom set "wacom dtk2241 pad pad" "button" "1" "key a"
Comments
Post a Comment