Revert "Remove xcape/xmodmap"

Similar to the other revert commits, I may want to do some programming
in xorg, where xcape and xmodmap are useful.
This commit is contained in:
Donovan Glover 2021-05-14 10:19:31 -04:00
parent 4c1be9aec4
commit 0fe3630a65
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 35 additions and 0 deletions

12
xmodmap/.xmodmap Normal file
View File

@ -0,0 +1,12 @@
! New Start: A modern Arch workflow built with an emphasis on functionality.
! Copyright (C) 2017-2018 Donovan Glover
! Clear both the caps lock and control keys
clear lock
clear control
! Set the caps lock key to Control_L
keycode 66 = Control_L
! Reassign the control command to the caps lock and control keys respectively
add control = Caps_Lock Control_L Control_R

23
xmodmap/README.md Normal file
View File

@ -0,0 +1,23 @@
# xmodmap
[xmodmap][xmodmap] is used to change the functionality of keys on your keyboard.
## Use Cases
xmodmap can be used to:
- Make Caps Lock function as Ctrl when held down
- Used with [xcape][xcape] to make Caps Lock function as Escape when pressed
You should not use xmodmap if:
- You do not need to modify keys
## Usage
Run `xmodmap ~/.xmodmap` in one of your init scripts to make Caps Lock function as Ctrl when held down.
Then, use `xcape -e 'Control_L=Escape'` to make Caps Lock (left Ctrl) function as Escape when pressed.
[xmodmap]: https://wiki.archlinux.org/index.php/Xmodmap
[xcape]: https://github.com/alols/xcape