Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yurenchen000/keyevent
a tool detect (at background, ubuntu) keyevent & run cmd //virtualbox switch workspace even in virtual machine, without host key
https://github.com/yurenchen000/keyevent
ubuntu utils virtualbox
Last synced: 19 days ago
JSON representation
a tool detect (at background, ubuntu) keyevent & run cmd //virtualbox switch workspace even in virtual machine, without host key
- Host: GitHub
- URL: https://github.com/yurenchen000/keyevent
- Owner: yurenchen000
- Created: 2020-12-18T22:32:21.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-31T00:30:59.000Z (almost 4 years ago)
- Last Synced: 2024-11-10T02:25:52.156Z (2 months ago)
- Topics: ubuntu, utils, virtualbox
- Language: C
- Homepage:
- Size: 25.4 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# keyevent @ubuntu
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`ref:
https://superuser.com/questions/108785/getting-host-to-capture-certain-key-presses-in-virtualbox/1611071## 1. choice eventX
ls -lh /dev/input/event*//a. use `evtest`
```sh
sudo evtest
```~~//b. use `xinput`~~ // it has different device num , not need root (through x input)
```sh
xinput list
# not need root
xinput test 18
```
//b. use `scan.sh`a script to scan all event*
```sh
sudo ./scan.sh
```
`Ctrl+C` or `Enter` to exit.// assume input device is `/dev/input/event18`
## 2. run keyevent
```sh
sudo ./keyevent /dev/input/event18
```## 3. run background
```sh
# start
INPUT=/dev/input/event18 ./key-vbox.sh start# stop
key-vbox.sh stop
```## X. use scan_run.sh
this script do step `1.` & `3.` works in one step automatically.
----
## note: get key event on ubuntu
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 root
- `showkey` not depend on input device (all keyboard are same),
// depend on **/dev/console**, need root
- `xinput test` (should specify device, not same with /dev/input/eventX)
// depend on **X system**, not need root