https://github.com/lexriver/linux-deep-hotkeys
Bind Space+JKIL as cursor
https://github.com/lexriver/linux-deep-hotkeys
bindings evdev event hotkeys keyboard keyboard-shortcuts keyboard-shortcuts-library linux remapping remapping-keyboards shortcuts xlib xmodmap
Last synced: 29 days ago
JSON representation
Bind Space+JKIL as cursor
- Host: GitHub
- URL: https://github.com/lexriver/linux-deep-hotkeys
- Owner: LexRiver
- License: mit
- Created: 2021-03-19T13:19:03.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-23T17:59:57.000Z (about 5 years ago)
- Last Synced: 2025-07-12T01:11:31.223Z (11 months ago)
- Topics: bindings, evdev, event, hotkeys, keyboard, keyboard-shortcuts, keyboard-shortcuts-library, linux, remapping, remapping-keyboards, shortcuts, xlib, xmodmap
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# linux-deep-hotkeys
This script allows you to use Space-key as a modifier key like Shift or Ctrl and as a usual Space-key at the same time.
This script adds the following bindings:
```
Space + j = Left
Space + l = Right
Space + i = Up
Space + k = Down
Space + u = Backspace
Space + o = Delete
Space + h = Home
Space + ; = End
Space + n = PageUp
Space + m = PageDown
Ctrl+Alt+Win+q = quit script
Ctrl+Alt+Win+z = pause/unpase bindings
```
But you can modify it as you like.
## Step 1 : install evdev
Evdev is a library for working with input devices.
More details here: https://en.wikipedia.org/wiki/Evdev
To install it for Ubuntu:
```
sudo apt-get install python-dev python3-pip gcc
```
```
sudo pip install evdev
```
For more details and other distros please see:
https://python-evdev.readthedocs.io/en/latest/install.html
## Step 2 : get script
```
wget https://raw.githubusercontent.com/LexRiver/linux-deep-hotkeys/main/linux-deep-hotkeys.py
```
## Step 3 : run script
To modify keyboard codes user must be in group `input`, so run the script as root.
```
sudo python3 linux-deep-hotkeys.py
```
Select your keyboard when asked.
Check if binding is working.
## To modify key bindings
Edit the script `linux-deep-hotkeys.py` line number around 50 `keycodes_to_bind`
## To set keyboard device name as argument
Run the script like so:
```
sudo python3 linux-deep-hotkeys.py --device /dev/input/event3
```
Again, to find your keyboard name, run the script without arguments.
## Licence
MIT
## Keywords to find this script
linux keyboard remapping shortcuts hotkeys binding evdev libevdev xmodmap xlib libinput xorg