21
submitted 8 months ago* (last edited 8 months ago) by iggames@lemmy.world to c/linux@lemmy.ml

I like using emacs-style navigation in the terminal (e.g. Ctrl + N for down, Ctrl +P for up, Ctrl + A for home, Ctrl + E for end), and I want to do something similar for navigation elsewhere. I would like to use CapsLock + N/P/A/E/etc for down/up/home/end in all apps (I previously used the AutoHotkey script at https://github.com/usuyama/emacs-like-key-bindings-windows to accomplish this in Windows).

I'm currently using KDE Plasma on Wayland, and I haven't seen anything obvious to do this while poking around settings. Any suggestions? Thank you in advance!

EDIT: I was able to do what I want with evremap. The crux of the config is:

[[dual_role]]
input = "KEY_CAPSLOCK"
hold = ["KEY_F19"]
tap = ["KEY_ESC"]

[[remap]]
input = ["KEY_F19", "KEY_N"]
output = ["KEY_DOWN"]

[[remap]]
input = ["KEY_F19", "KEY_P"]
output = ["KEY_UP"]

See my reply below for more info.

you are viewing a single comment's thread
view the rest of the comments
[-] Shareni@programming.dev 2 points 8 months ago

Check out kmonad. You can set on-hold caps to switch to an Emacs navigation layer. In that layer you can for example set the n button to send the arrow instead.

It complains in Wayland about using some X11 tool, but works without issues from my limited experience.

this post was submitted on 20 Feb 2024
21 points (92.0% liked)

Linux

48113 readers
694 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS