a tool detect (at background, ubuntu) keyevent & run cmd.
on ubuntu
when vbox get focus, can't use Ctrl+Alt+Left
to switch workspace.
this daemon tool, as one workaround:
- detect keyevent, then:
- run cmd to switch workspace // depend
xdotool
- run cmd to switch workspace // depend
ls -lh /dev/input/event*
//a. use evtest
sudo evtest
//b. use // it has different device num , not need root (through x input)xinput
xinput list
# not need root
xinput test 18
//b. use scan.sh
a script to scan all event*
sudo ./scan.sh
Ctrl+C
or Enter
to exit.
// assume input device is /dev/input/event18
sudo ./keyevent /dev/input/event18
# start
INPUT=/dev/input/event18 ./key-vbox.sh start
# stop
key-vbox.sh stop
this script do step 1.
& 3.
works in one step automatically.
Get key event on host ubuntu at low-level
// use tools such as showkey
, evtest
, or getevent
evtest
,getevent
(should specify input device),
// depend on /dev/input/eventX, need rootshowkey
not depend on input device (all keyboard are same),
// depend on /dev/console, need rootxinput test
(should specify device, not same with /dev/input/eventX)
// depend on X system, not need root