| 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. |
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