Hacker News new | past | comments | ask | show | jobs | submit login
Keyd: Linux Key Remapper (github.com/rvaiya)
143 points by gigatexal on June 3, 2023 | hide | past | favorite | 85 comments



If you're on mac, Karabiner is the best tool for remapping. I use it to remap normal keys to hyper keys. So pressing on `a` key together with `f` will do control + f and things like this.

https://wiki.nikiv.dev/macOS/apps/karabiner


This is amazing, I can't believe I haven't seen this before, mapping caps_lock to right command and using rcmd for app switching is amazing, previously I just had caps set to esc and used left_command + esc as a global toggle for terminal.

I tried remapping a normal letter key's (a) long press to a command+a but it seems to actually trigger the letter "a" before triggering the modifier.


Karabiner is amazing and unfortunately I haven't found an equivalent on Linux. I use Karabiner for the following usecase.

* Mapped both caps lock and return key when they are clicked with another key to act as Ctrl. When they are clicked alone without combination then they work as ususal.


Awesome app, though unfortunately it doesn't support proper alpha-to-hyper modifiers that wouldn't interfere with typing (tweaking various delays help, but still not equivalent), and lacks some in-app context like whether you're in a text field within an app


On my Macbook Pro, the only thing I use Karabiner for is to map my right Option key to a true "Enter" key (as opposed to the "Return") key. I'm sure I'm under-utilizing it, but it works great for that.


Doesn't that get triggered if you type "after" fast enough?


I saw some comments/issues on poor experience with international keyboards, specially wayland+chromium stuff (so virtually all electron apps).

Anyone mind sharing how to avoid such pitfalls? Or going straight to kanata?

I usually use us-intl or us international with alt-gr dead keys for characters like ç áãóê on portuguese, sometimes ñ for spanish. My notebook keyboard is pt-br abnt, but usually I'm on either a keychron k3 pro or a mx keys with US ansi layout.

btw I really liked the idea of using normal keyboards (logitech mx keys, notebook keyboards) like a qmk one.

Also having only one extra layer on keychron is preventing me to do more.


You could also make/get a converter that turns pretty much any USB keyboard into a QMK keyboard:

https://geekhack.org/index.php?topic=69169.0

https://yaowei.dev/posts/usb-to-usb-converter/


This is nice. The hardest part is laptop keyboards though %)


I moved to a keyboard with customisable firmware, as software painpoints always existed - Remote Desktop and virtual machines were inconsistent with how they worked etc


On X11 and Chromium and I have no issues with this in the slack web version


Tangential: I'm currently looking for a way to map Mac-style shortcuts on Linux (e. g. Meta + C/V for copy / paste). The only thing I know is https://kinto.sh/, but it looks a bit too janky to my taste. Any other ideas?


This is how I do it in keyd by remapping Meta+C/V to C+Ins/Shift+Ins (keyd.conf):

  [ids]
  *

  [main]
  capslock=overload(control, esc)
  
  [meta_mac:M]
  c=C-insert
  v=S-insert


I don't get this. You define the layer meta_mac but there's no key that uses it...


maybe on a mac keyboard this [meta_mac:M] is the key and the stuff below it is how it's configured? I'm not 100% sure.


I was looking for the same thing. This is what I hacked together to scratch the itch: https://github.com/davidkellis/mackeys

I run PopOS


Damn, this looks great.


Also tangential: I'm looking for this kind of solution too. I always rejected xmodmap on the basis of it being specific to X11 and not necessarily "working everywhere".

I personally want to be able to use S-c and S-v to copy-paste everywhere, but have a solution that works across all programs: terminal, Emacs, Firefox, etc.


I have looked into this a year ago, with the goal of having some key - named control or not- always perform the emacs-lite operations we know from readline. But it seems like it's very tedious, as most of GUI toolkits expect the windows-like behaviour and are not reconfigurable


KDE has option to swap ctrl and meta or ctrl alt and meta depending on your keyboard. If you then map meta to ctrl in the kconsole settings things are very mac like.

KDE even has good global menu


This looks like a very competent & fast replacement for interception-tools (https://gitlab.com/interception/linux/tools). Nice. Having multiple layers is very interesting to me. Being able to quickly swap config is also compelling.


Yeah I’m really looking forward to playing with this. Going to map caps lock to escape for vim. But the sky is the limit: with all the layer stuff.


> the sky is the limit: with all the layer stuff.

Some techniques I've liked / made use of (although I support may vary depending on the tool you use):

- Using tap-hold to put Shift/Ctrl/Gui/Alt on home row underneath fdsa (and on the right-hand side, too).

- "Caps Word", where CapsLock functionality is enabled until a non-[A-Za-z0-9_] letter is input.

- Having a 'combo'/'chord' where pressing 'cv' or 'm,' would take me to the previous/next virtual desktop.


I was using caps-lock for control for a while. But dual mode, where caps lock is escape if pressed alone, control if pressed in combination with anything is soooo good. Huge upgrade, highly recommend. An interesting base example of stateful key presses


Yeah I am doing the same: I took the sample global configuration from the readme. It’s been a trip trying to retrain my finger memory.


You might enjoy putting Ctrl on your space key then. Even bigger upgrade. :)


Long-term user of interception-tools here. Has performance ever been an issue for anyone? For me it hasn't, at least.


I'm having a great time with interception-tools. I'm finding it more stable / consistent than xcape (which I had been using for a few years prior), to the extent that I've moved some of my QMK functionality to interception-tools so that I can have better consistency between laptop and external keyboard.


Exactly, I, too, used to use xcape and am very happy with interception-tools.


I think this would be valuable if it replaced ALL other tweaks and hacks. According to the docs, it still requires other tools/configurations e.g. to make compose work.


Also, on all keyboards, not just custom ones :)

This, and KMonad, finally allow me to have e.g. modifier keys on the home row right on my stock laptop keyboard. (Maybe someday Framework laptops will support ergonomic keyboards. Thinkpads never will, I suppose.)


System76 keyboard-configurator - a Rust frontend to the keyboard firmware, for laptops at least - is very nice. It doesn't do that much, but it allows you to remap every single key to any other. Fn, Caps Lock, AltGr, Menu everything![1] Since you can make any special key not be special, you can then use xbindkeys or keyd to create more complex configurations without worrying about the keyboard sending unsupported, or sending no key codes at all.

[1] Almost. Many XF86... codes (eg. XF86TouchpadToggle) are not supported, although I suspect hacking the firmware or keyboard-configurator to add them wouldn't be that hard.


"... make compose work" what do you mean by that?

What was interesting is that this brings QMYK(?) functionality of different modes to "dumb" keyboards. I think that's really dope!


From the docs:

> For this to work 'setxkbmap -option compose:menu' must be run after keyd has started.

So now I need to run keyd AND setxkbmap, and setup my configuration in /etc/keyd AND ~/.XCompose


Ahh I see. Bummer.


Not yet investigated keyd. I still use good old .Xmodmap tricks on Linux, and AutoHotKey on Windows. Plus some VIA macros directly on my programmable keyboard. And I [plan to] investigate kanata (https://github.com/jtroo/kanata)


Kanata is good. I use it to have some consistent keyboard configuration between Linux and Windows.

One nice feature it has over AutoHotKey[^1] is that it can use Interception (a keyboard filter driver) to handle keys earlier, which lets it work in more situations (e.g across RDP sessions). Interception itself though does have a bug where if you keep adding/removing devices it will stop working until you restart.

1: I've seen an Interception module for AHK, but it's not built in like Kanata's


I've tried about ten billion different tools on linux and can confirm that kanata is better than everything else mentioned in this thread and a lot more. It's not the right tool for global hotkeys, so it's not going to completely replace something like AHK or wkhd, but it's basically the closest thing to QMK functionality for a laptop or non-programmable keyboard.


If you are looking for static system wide key remapping on the console without additional dependencies, extra software or running daemons the program "loadkeys" should be working on any Linux system. Configuration on startup is dependent on the distribution.


+1 to the use of a built-in approach


I really like https://github.com/jbensmann/mouseless as it will also let you remap keys to control the mouse. I went down a rabbit hole of key remapping, and can't remember exactly why I settled on it, but posting as an alternative for others to look at.

I thrive off caplock as a toggle for remapped keys. I turn my sdf-234 into a numpad and jkl; for arrows and some other text navigation binds so I never need to veer far from the home row. caps-/ for ~ I can't live without.


For [single mouse click] I use warpd on Linux almost exclusively. I hope an equivalent [with the same configurability] will be available on Windows one day.


Japanese Industrial Standard (JIS) mac OS keyboards have an extra hyper key on the right side of the spacebar.

Comparison pics below:

https://appleshinja.com/us-jis-hikaku

It also looks like there's an extra key next to the ?-mark key.

I would love to master Ctrl & Alt (plus maybe the "Windows" key) across Linux, mac OS, and Windows, and load the rest with arcane macros.

Just that the Unicomp 101 refuses to break, so I don't have a Windows key either.


I use a Japanese keyboard for that very reason (even though I don't speak japanese). I don't think that, technically, it's an "hyper key". These are the henkan and muhenkan keys, to switch input methods (kanas / romanji / etc.).

But that's precisely how I use these keys: I remap the one at the left of the (always very narrow on japanese keyboard) spacebar to "Hyper".

Note that the USB HID doesn't have the concept of the Hyper key (so I remap it from X11 / xkb).

Now... Some may wonder: why buy a japanese keyboard and not some fancy ergonomic / DIY keyboard? Several reasons. Japanese is kinda a big country and japanese keyboards are here to stay, so my trick shall keep working until long after I'm dead. Japanese laptops: japanese keyboard on the laptop, I now effectively can have a laptop with a "Hyper" key.

And then the main one: the DIY keyboard community can apparently only do variations of Cherry switches or similar switches. My switch of choice is Topre. I didn't find any DIY keyboard with Topre switches.

So I use a japanese keyboard, with Topre switches. And I remap it and there's nothing "japanese" about it anymore.


I am using Xmodmap at the moment and I find it frustrating since it doesn't work in all the apps. Loadkeys doesn't also work everywhere. For some reason some key combination gets intercepted by the apps. Ian very hopeful keyd will work.

I am currently remapping keys to have VIM style arrow keys in the middle of the keyboard. That works everywhere but if you add Ctrl and Shift to the mix you it doesn't work everywhere anymore.


I'm having similar adventures in Emacs/EXWM with trying to implement Super + IJKL movement. It works fine until you start adding other modifiers into the mix, especially Shift.


Here are the relevant parts of my .xkb file. Note that the "osfUp" code is code I found elsewhere (don't remember where). Just repeat it for Left, Right and Down.

I first added this new "THREE_HYPER" using three levels (you can add more levels if you fancy that):

    type "THREE_HYPER" {
        modifiers= Shift+Hyper;
        map[Shift]= Level2;
        map[Hyper]= Level3;
        map[Shift+Hyper]= Level3;
        level_name[Level1]= "Base";
        level_name[Level2]= "Shift";
        level_name[Level3]= "Hyper3";
    };
Then the "interpret" does the magic:

    interpret osfUp {
        repeat= True;
        action = RedirectKey(keycode=<UP>, clearmodifiers=Hyper);
    };
And for each key, assign the arrow key redirection you want (showing only "i" for up here):

    key <AD08> { type= "THREE_MESH_HYPER", symbols[Group1]= [ i, I, osfUp ] };
I'd say that it's not a job for xmodmap but for .xkb.

Also I don't use xmodmap at all: I set everything, including all the modifiers, from my .xkb file.

My xmodmap output for Hyper (which I set, from .xkb, as mod5):

    ... $  xmodmap | grep mod5 
    mod5        Hyper_L (0xcf)
You'll want to read on .xkb but this should get you started.


I'm using "Hyper + ijkl" in X11 and it works in every app, not just Emacs. Basically I made a custom .xkb file which does send the actual arrow keys code when "Hyper + ijkl" is pressed. It works in drop down menus, in terminal, anywhere.

It's like pressing the arrow keys.

And it works fine with shift, for as far as any app are concerned they're only seeing "shift + arrow key(s)".

It would work with Super too.

I'll find some part of the .xkb file and paste them here in a few moments.


I'm using on X11 https://github.com/sezanzeb/input-remapper (currently 2.4k stars)

"Supports X11, Wayland, combinations, programmable macros, joysticks, wheels, triggers, keys, mouse-movements and more."

My use cases are:

- System wide VIM like key mapping

- Access umlauts from my US-keyboard layout

- Key remapping

It's also working great to remap the 10+ buttons of a razer naga mouse


I'm using this successfully: https://github.com/k0kubun/xremap


See also: keymapper (for Windows and Linux)

https://github.com/houmain/keymapper


I write often in English and Portuguese but I have a US keyboard. What I do is I map A, O and C with Altgr to Ã, Õ and Ç. I modified manually the keyboard configuration for us-intl layout, which works but time and again the file gets overwritten during system updates. The fix is simple, just copy the backed up file and set the layout using setxkbmap, but it is quite annoying. I'll try this out!


My naive expectation would be that you could create a us-int2 layout. Is that not the case?


I could try it out, haven't really thougt I could derive layouts without modifying the original files, but when I come to think of it this is so basic I'm surprised it didn't occur to me... I will check it out!


Does this work on wayland? I used to have Caps mapped as Escape when pressed alone but as Ctrl when in combination with another key. On wayland, there's no easy way on sway or gnome (which is what I used on Ubuntu). There is `caps2esc` and `interception_tools`. But I had some problems with it interfering with startup sometimes on sway. But on Ubuntu gnome, I haven't tried it again.


The first paragraph:

> Linux lacks a good key remapping solution. In order to achieve satisfactory results a medley of tools need to be employed (e.g xcape, xmodmap) with the end result often being tethered to a specified environment (X11). keyd attempts to solve this problem by providing a flexible system wide daemon which remaps keys using kernel level input primitives (evdev, uinput).

So yes it seems to work on both x and wayland


It does, been using it for a year or so.


Thank you for letting me know! I just started using it and it's working perfectly


Would this somehow work on FreeBSD/OpenBSD? I'm definitely about to start remapping keys, but I haven't researched the tooling there. So far, I assume the underlying lower level mechanisms are the same (at least for X). Does anybody know whether this would compile and work on FreeBSD & OpenBSD?


It has been in the FreeBSD ports collection since August 2021.


Fantastic.


This is actually really nice. I don’t like the solutions which only work on X or worse, only in Gnome. I have a programmable keyboard and like that solution best, wherever I plug in my keyboard the keys are mapped just the way I like it!

But for your laptop keyboard on your Linux laptop this seems like a great solution


Kind of crazy, I was literally looking for a solution to this about an hour ago, and then this popped up.


Same here


isn't that why we refresh HN every 30 mins? ;-)


Keyd is great. Really easy to use. Kmonad is another option but configuring it is steeper I find.


Is this gonna help my chromebook alt-key when using vscode in linux? Because there's no special key the alt is used as alt+backspace = delete and a few other things. It makes alt-up/down and alt+shift copy up down not work.


there's app specific configs you can do. Try that.


What is the values of delays that work for you? For example, my capslock key acts as both escape and control - but I am yet to find the delays that will let me smoothly roll over to other keys from escape.


Delays are a terrible solution. Looking at key overlap percentage, for example, works much better. There are a lot of other ways to make dual-use/tap-hold functionality more reliability, but lots of programs actually implement overlap checks. The kaleidoscope keyboard firmware, for example, lets you configure a minimum overlap threshold for a key to start acting as its secondary role (e.g. only have space act as a modifier when it is pressed first and is held for 70% of the time the second key is pressed).

In your case, I'm not sure why you would need to roll over to other keys from escape. My shift key doubles as escape, and I don't use any delay or checks at all since I don't rapidly type escape then other keys. In any case, you could try configuring your capslock key to only act as control if it being held fully overlaps with the next keypress. Not sure about keyd, but kmonad and kanata both support this (I'd highly recommend kanata). That may require changing how you type depending on the modifier, which is why more fine-grained overlap threshold checks can be useful.

Relevant github issues:

https://github.com/kmonad/kmonad/issues/351

https://github.com/jtroo/kanata/issues/128


I use this (because I'm lazy) to remap caps lock to ctrl if pressed with another key. If not it is backspace.

I also switched position for Q and escape (q is very rare in Swedish)


Is there anything that reaches the power of Karabiner Elements + Keyboard Maestro on Linux? (e.g., where application specific remapping is not experimental)


I never looked at karabiner's full functionality, but kanata is the closest thing to a linux version of QMK. It can kind of be used for hotkeys, but that's really not its purpose. Better to use a separate hotkey daemon.

Keyboard Maestro would be replaced by one or more completely different tools. There are programs that allow application-specific mapping. I've never seen the point of it, so I can't comment if any of them are any good. What are you looking to do? As someone who uses the keyboard for everything, my experience so far has been that macOS is much weaker at this.


> As someone who uses the keyboard for everything, my experience so far has been that macOS is much weaker at this.

Based on what I’ve seen, this isn’t true. macOS supports an amazing amount of keyboard mapping capability.

There’s a serious rabbit hole of macOS keyboard remapping; you’ve been warned: https://brettterpstra.com/topic/keybindings/


Keyboard mapping is fine on macOS (though most of those posts seem related to software or functionality I would never use). Keyboard-only experience is a lot more than keyboard mapping.

Consider window management, for example. If we're talking about using the keyboard for nearly everything, window management is one of the most fundamental parts of interacting with a computer. Linux has dozens of keyboard-based tiling window managers. You have only a few options on macOS, and they are all weak by comparison. Yabai is passable if you partially disable SIP so it can manage spaces, but it still has pretty limited functionality compared to herbstluftwm and bspwm (which is what it's mimicking) and feels hacky.

Similarly, cli tools are very popular on linux, and it is very easy to bind keys to them. Luckily a lot of tools work on both linux and mac, but this is not always the case. Replicating my global hotkeys has been an annoyance on macOS in some cases because of this. In linux, you have control of and multiple options for basically everything (e.g. bootloader, what you use for networking, what you use for notifications, etc.). In the case of notifications, on linux I can just bind a key to "dunstctl close-all" to close all notifications or "dunstctl history-pop" to show old notifications. My notification daemon is designed with scriptability in mind. If I want to have a similar keybinding on macOS I have to go through an arduous process of trying to find some up-to-date applescript snippet that actually works and isn't slow (couldn't find one that met either requirement) or learn to use some other automation tool. Unlike the WM case, I'm sure it's possible, it's just that macOS is just very clearly not designed with the use-case of keyboard for everything in mind. It can still support it very well, but with linux I can have it so that non-keyboard-friendly software just doesn't exist on my system. I don't need to workaround it.


Thank-you. Found a list of actual macOS keybindings, a cheat sheet of sorts:

https://brettterpstra.com/projects/keybindings/


Thanks, I'm aware of kanata, though haven't properly investigated it yet, the one area where it can beat Kara+ is if it implemented non-delayed based home row mods (though that's still an open issue; don't remember whether QMK supports it perfectly or also with delays, but a software solution to this would be much appreciated for all the laptops).

The low-level remapping and higher level app-specific and context-aware functionality is the Holy Grail that's still unachievable in any system, unfortunately, so that's why I specifically asked about the combo

> What are you looking to do

There are way too many interactions for me to list, it's anything from disabling all shortcuts when you play a game to quitting Insert text editor mode when you hold I, to making chord-based command menus with visual cues in apps that don't support anything like that, to inserting special symbols with helpful popups that only popup if you stumble and forget which key is next, to showing a palette with apps to launch with single keys without having to remember all those keys

You simply can't achieve it only via QMK-low-level approach


Kanata supports early tap-hold dispatch based on key overlap, which is all I need. There's an open issue for more advanced conditions: https://github.com/jtroo/kanata/issues/128

The maintainer has been very responsive in my experience and would probably add more advanced conditions if someone wanted them.

> There are way too many interactions for me to list

Sounds like mostly hackarounds for non-keyboard-friendly software. I generally prefer to use keyboard-friendly software (of which there is no shortage on linux) and just make application-specific keybindings directly in each application. Anything else is inevitably a hack. Window management, browsing, anything related to text or programming, etc. all have good keyboard-friendly options. I have to use some stuff like excel and teams for work, but I'll just use the mouse more in those cases. I don't spend a significant amount of time dealing with applications like that though, and e.g. for Teams I'd try set up a matrix bridge or just use warpd before trying anything else.

Teams no longer supports linux, but for other apps that have non-customizable key shortcuts, it's definitely possible hack around that and create your own in linux. E.g. When I used to use libreoffice regularly, I set up modal keybindings that sent the corresponding chords to libreoffice.

As long as I can use my editor to type anything non-trivial, I'm good. For example, you have generic software like sketchyvim on mac to essentially use vim in any input field. I don't think there's a linux equivalent that lets you essentially embed an editor like vim inside any input field, but you can use a generic keybinding to open one and then have the text sent back when you're done.

A lot of the examples you list don't seem to need any app-specific or context-aware functionality (e.g. your launcher example). I don't have enough of an idea of what you actually want to know if what's available on linux would support your use cases, but in addition to the numerous basic hotkey daemons there are programs like keyszer that support application-specific keybindings ootb or hawck which is scriptable in lua and supports conditional keybindings (allowing you to script per-application keybindings). You have some context available but only what is externally available, i.e. unless the program provides some way to interact with it like a cli utility or ipc socket, all you're going to be able to do is send input to it.


> Sounds like mostly hackarounds for non-keyboard-friendly software. I generally prefer to use keyboard-friendly software (of which there is no shortage on linux) and just make application-specific keybindings directly in each application.

No way, that's an almost non-existing class of apps. Which "keyboard-friendly software" supports the differentiation between tap and hold? Hold delays? Simultaneous keypresses? Arbitrary alpha key modifiers (hold T for Toolbar and tap 1,2,3 select different types of brushes in your image app)? Support for custom notifications? Knows left from right? Supports chords, not just combos, including single-key shortcuts? Basically, every app would need to add karabiner/katana as a library and slap app-specific contexts on top of that. Which apps do that???

> Anything else is inevitably a hack.

It's also the only way to make something great. There is no "native" OS/app development platform that matches that power, so it's very rare for an app to implement anything advanced on its own

> for other apps that have non-customizable key shortcuts

But it's not a binary, even apps that offer customizable key shortcuts, mostly offer underpowered versions nowhere close to what a keyboard remapper can offer.

> When I used to use libreoffice regularly, I set up modal keybindings that sent the corresponding chords to libreoffice.

But presumably you wouldn't want to send those shortcuts outside of Libreoffice, right? So you key remapper has to be app-aware

> sketchyvim on mac to essentially use vim in any input field.

This is great and I wish all OS had this basic functionality of allowing users to use their advanced text editing tools anywhere (there is also a more limited browser-only, but cross-platform extension GhostText)

> I don't think there's a linux equivalent that lets you essentially embed an editor like vim inside any input field, but you can use a generic keybinding to open one and then have the text sent back when you're done.

Sure, also you can always copy&paste, but that's friction, so not very suitable for smaller edits. Though maybe you can set a keybind that would instantly open a specially configured editor with a very small window size (basically, the size of a text field) without any extra visual stuff like gutter etc.?

> A lot of the examples you list don't seem to need any app-specific or context-aware functionality (e.g. your launcher example)

All of them do, e.g., app launcher requires the contexts of the app state. If the app is in the foreground, it will hide it, if it's in the background, it'll show it, if the app isn't not launched, it'll launch it.

> keyszer

that's only X11

> hawck which is scriptable in lua

thanks for tip, Autohotkey which it aims to replace is great (and lua is better, though also not a great scripting language), so this would be something like Hammerspoon on a Mac. That would still fall short of Keyboard Maestro with its GUI where you can much easier find he available actions and stich them together

> You have some context available but only what is externally available

That's a very common limitation unfortunately


> No way, that's an almost non-existing class of apps. Which "keyboard-friendly software" supports the differentiation between tap and hold? Hold delays? Simultaneous keypresses? Arbitrary alpha key modifiers (hold T for Toolbar and tap 1,2,3 select different types of brushes in your image app)? Support for custom notifications? Knows left from right? Supports chords, not just combos, including single-key shortcuts?

It would be cool, but I just don't see any of this as necessary. What I use supports single-key shortcuts, modality, and modifier shortcuts, and I wouldn't need anything else. Emacs and probably vim support arbitrary key combos and some more advanced functionality with timeouts, but I don't use those features. Even at the global level, I don't use tap-hold on alpha keys or arbitrary combos. It seems like these extra features are primarily useful as workarounds for having a bad keyboard. Normal modifiers are good enough for me. There are already plenty of actions available using just single keys and modifier keys, and modifier keys are comfortable on a good keyboard (even on my personal laptop I have 8 comfortable thumb keys). "hold T for Toolbar and tap 1,2,3" seems like a comparably painful/inefficient chord, and I'm not using software designed primarily with mouse interaction and things like toolbars in mind.

> But it's not a binary, even apps that offer customizable key shortcuts, mostly offer underpowered versions nowhere close to what a keyboard remapper can offer.

I'm definitely biased in that I'm a software engineer and am not working with graphical applications like photoshop. 95% of my time is spent using tools that are programmable and intended to be used primarily with a keyboard or at least have first-class support for it.

> there is also a more limited browser-only, but cross-platform extension GhostText

firenvim can also actually embed vim in browser input fields regardless of OS. Vim is really the only option still if you don't want an external window though.

> Though maybe you can set a keybind that would instantly open a specially configured editor

Right, there are things like emacs-everywhere that can be globally bound and will automatically handle the "syncing." Probably there are similar plugins for other editors but nothing universal I'm aware of.

> All of them do, e.g., app launcher requires the contexts of the app state. If the app is in the foreground, it will hide it, if it's in the background, it'll show it, if the app isn't not launched, it'll launch it.

I have global keybindings for all my most used applications that support toggle/dropdown functionality. I don't really use enough applications to need a launcher that does this, but you can at least implement this using external context only. It would be easy to script something like this on linux, but it would be X11-specific (e.g. tdrop + maybe rofi) or window manager-specific.

> That would still fall short of Keyboard Maestro with its GUI where you can much easier find he available actions and stich them together

Only if you're a fan of GUI configuration. I'd much rather have no GUI at all and just good documentation.

> It's also the only way to make something great. There is no "native" OS/app development platform that matches that power, so it's very rare for an app to implement anything advanced on its own

> > You have some context available but only what is externally available > That's a very common limitation unfortunately

It certainly would be nice if all software was integrated at the level where you could access and work with internal state. It's why I'm using Emacs for nearly everything, but then you're stuck with whatever limitations/flaws the system has, so there are tradeoffs. If you like having options, it's nice that linux has so many Desktop Environment choices and dozens of really good window managers. By comparison, if you like tiling window managers, macOS is not great. Yabai is passable but requires partially disabling SIP or else it can't even manage/switch spaces. On the other hand, a lot of hammerspoon functionality is missing on linux. Linux will probably never have any good generic automation tools. X11 at least has some more advanced, generic tools like xdotool, but this is currently impossible with Wayland, and definitely nothing supports both. Anything more advanced than input like window management is wm/compositor-specific currently on Wayland, so if anything, linux is going backwards wrt generic keyboard/automation tooling.


> I'm not using software designed primarily with mouse interaction and things like toolbars in mind. > I don't use those features. > Even at the global level, I don't use tap-hold on alpha keys or arbitrary combos.

But I do! Hence my question specifically about tools that match the power of the ones I use that allow the use of a broader class of apps than just emacs

> It seems like these extra features are primarily useful as workarounds for having a bad keyboard. Normal modifiers are good enough for me.

> "hold T for Toolbar and tap 1,2,3" seems like a comparably painful/inefficient chord, and

It's specifically chosen for the T mnemonic (thumb B for toolBar is also fine), which is easier to remember than the more convenient thumb mods, so works better for less frequently used functions

> There are already plenty of actions available using just single keys and modifier keys

Only if you significantly constraint app universe!

> probably vim support arbitrary key combos

Vim doesn't even support left vs right modifiers

> 95% of my time is spent using tools that are programmable and intended to be used primarily with a keyboard or at least have first-class support for it.

That's not first-class, that would be power+usability, and none offer that, you can get to power with a lot of effort and using other tools

> I have global keybindings for all my most used applications

Globals interfere with some uber-global fullscreen apps which you don't want to accidentally interrupt.

> Only if you're a fan of GUI configuration. I'd much rather have no GUI at all and just good documentation.

Or if value your time, for a lot of these functions it'd take much longer reading the docs/writing scripts

> If you like having options, it's nice that linux has so many Desktop Environment choices and dozens of really good window managers.

I like having good options, so having many subpar ones doesn't help. Hence the original question, it takes a lot of time having to review and find limitations of the various options, so thanks for the tips

> linux is going backwards wrt generic keyboard/automation tooling.

:(


You can also just Google “macos hyper key” and you’ll see how much is out there; this capability has been in macOS since the beginning.


I love this app! Big thanks to the dev


Another tool which has horrible, non intuitive syntax. Whyyyy?


Which part is the horrible part? The --help and --version options? The printing of diagnostics to standard output? Or the INI file configuration file?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: