9 ms·
Hacking Your Keyboard with Karabiner
- submeta 4y agoNikita Voloboev has written a blog post about how to use Karabiner and Goku [1] to change the whole setup of your keyboard. He calls it „God Mode“. I replicated that and it has changed the way I interact with my computer. [1] https://medium.com/@nikitavoloboev/karabiner-god-mode-7407a5ddc8f6 https://medium.com/@nikitavoloboev/karabiner-god-mode-7407a5...
- ris58h 4y agoShould have 2019 in the title.
- johnfonesca 4y agoI'm doing the same things with Autohotkey but in a much less convoluted way.
- throwanem 4y agoI'd love to know how to get AutoHotkey running on my Macs!
- samwillis 4y agoI use Karabiner to make one specific change to my keyboard. I remap §/±, the top left key on my UK 2018 MacBook Pro, to escape. Massive quality of life improvement over the "soft key" escape on the Touch Bar. I really should explore its other uses. (I'm not actually against the Touch Bar. I find it useful for a few things such a screen shots. But escape should never have been on it)
- ris58h 4y agoYou could assign escape to capslock in the MacOS keyboard settings. Update: for simple keyboard remapping there is built-in `hidutil` command https://developer.apple.com/library/archive/technotes/tn2450/_index.html https://developer.apple.com/library/archive/technotes/tn2450... https://hidutil-generator.netlify.app/ https://hidutil-generator.netlify.app/
- ris58h 4y agoKarabiner is a bloatware. I've spent some time to uninstall it completely. For a simple keyboard remapping I use built-in 'hidutil' command. https://developer.apple.com/library/archive/technotes/tn2450/_index.html https://developer.apple.com/library/archive/technotes/tn2450... There is also https://hidutil-generator.netlify.app/ https://hidutil-generator.netlify.app/
- polyrand 4y agoTIL about 'hidutil', do you know if it can remap single key to a combination of keys? E.g: remap Caps Lock to "Ctrl + Option + CMD"
- ris58h 4y agoI'm not aware of such feature but I've found that there are other properties in hidutil configuration https://github.com/FSecureLABS/OSXFuzz/blob/600f28c1c4a1211cdc6af13f1550f093a8886f18/OSXFuzz/library_calls/iohidfamily https://github.com/FSecureLABS/OSXFuzz/blob/600f28c1c4a1211c.... "HIDKind", "HIDInterfaceID", "HIDSubinterfaceID", "HIDOriginalSubinterfaceID", "HIDParameters", "HIDVirtualDevice", "HIDKeyRepeat", "HIDInitialKeyMapping", "HIDKeyMapping", "HIDResetKeyboard", "HIDKeyboardModifierMappingPairs", "HIDKeyboardModifierMappingSrc", "HIDKeyboardModifierMappingDst", "HIDKeyboardCapsLockDoesLock", "HIDKeyboardSupportsF12Eject", "HIDKeyboardSupportedModifers", "HIDPointerResolution", "HIDPointerResetPointer", "HIDPointerConvertAbsolute", "HIDPointerContactToMove", "HIDPointerPressureToClick", "HIDPointerButtonMode", "HIDPointerButtonCount", "HIDPointerAcceleration", "HIDPointerAccelerationSettings", "HIDPointerAccelerationTable", "HIDScrollReset", "HIDScrollResolution", "HIDScrollReportRate", "HIDScrollAcceleration", "HIDScrollAccelerationType", "HIDScrollAccelerationTable", "HIDScrollResolutionX", "HIDScrollResolutionY", "HIDScrollResolutionZ", "HIDScrollAccelerationTableX", "HIDScrollAccelerationTableY", "HIDScrollAccelerationTableZ", "HIDScrollMouseButton", "HIDScrollZoomModiferMask", "HIDTrackpadAcceleration", "HIDMouseAcceleration", "HIDClickTime", "HIDClickSpace", "HIDWaitCursorFrameInterval", "HIDAutoDimThreshold", "HIDAutoDimState", "HIDAutoDimTime", "HIDIdleTime", "HIDBrightness", "HIDAutoDimBrightness", "HIDFkeyMode", "HIDStickyKeysDisabled", "HIDStickyKeysOn", "HIDStickyKeysShiftToggles", "HIDMouseKeysOptionToggles", "HIDSlowKeysDelay", "HIDF12EjectDelay", "HIDMouseKeysOn", "HIDUseKeyswitch", "HIDDisallowRemappingOfPrimaryClick", "HIDMouseKeysEnablesVirtualNumPad", "HIDResetLEDs", "HIDAccelCurves", "HIDTrackingAccelCurves", "HIDScrollAccelCurves", "HIDAccellCurvesDebug", "HIDScrollAccelCurvesDebug", "HIDAccelGainLinear", "HIDAccelGainParabolic", "HIDAccelGainCubic", "HIDAccelGainQuartic", "HIDAccelTangentSpeedLinear", "HIDAccelTangentSpeedParabolicRoot", "HIDAccelTangestSpeedCubicRoot", "HIDAccelTangentSpeedQuarticRoot", "HIDAccelIndex", "HIDScrollCountMaxTimeDeltaBetween", "HIDScrollCountMaxTimeDeltaToSustain", "HIDScrollCountMinDeltaToSustain", "HIDScrollCountIgnoreMomentumScrolls", "HIDScrollCountMouseCanReset", "HIDScrollCountMax", "HIDScrollCountAccelerationFactor", "HIDScrollCountZero", "HIDScrollCountBootDefault", "HIDScrollCountReset",
- euroderf 4y ago> For example, a common mod that a lot of programmers like to do is remap their Caps Lock key -> Escape. So if I tap the Caps Lock key, it instead emulates hitting the Escape key. You can do this pretty easily with Karabiner Of course you can do this with stock macOS too. System Prefs > Keyboard > Keyboard > Modifier Keys... > Apple Internal Keyboard + Caps Lock Key
- pprotas 4y agoI use Karabiner to map CAPS to ESC on single tap, but it's mapped to CTRL when I hold it. It's really great to have a CTRL button on the home row.
- rezaprima 4y agoI do that too, and even map hold on enter to ctrl too
- renewiltord 4y agoBut if you do this you get a huge delay on caps lock as esc. You need a tool like this https://github.com/gkpln3/CapsLockNoDelay https://github.com/gkpln3/CapsLockNoDelay
- innocentoldguy 4y agoI use Karabiner Elements to: 1. Map my Caps Lock key to be an Escape key when I tap it and a Control key when I hold it down. 2. Map my Shift keys to be left and right parenthesis when I tap them and Shift keys when I hold them down. 3. Map the Tab Key to be a Tab key when I tap it and an ALT key when I hold it down. I also set my keyboard to Dvorak. These modifications make it much nicer to work with Emacs and VS Code with Emacs bindings.
- swah 4y agoI tried these mods and they completely failed me. I think they would work in keyboard firmware - are the people praising QMK doing stuff like this?
- avtar 4y agoYup, QMK supports that: https://github.com/qmk/qmk_firmware/blob/master/docs/mod_tap.md https://github.com/qmk/qmk_firmware/blob/master/docs/mod_tap...
- ponyous 4y agoKarabiner is almost too flexible. It let's you do almost anything, but it's so hard to configure it correctly. I use it for example to remap CAPS -> CTRL and CAPS + ' = `. Sometimes it just enables caps lock instead. Also, after few hours of use laptop starts to feel as if it's lagging. 1 key press will output multiple letters. The only solution is to restart karabiner every few hours. Anybody has any simple alternatives? Even if it costs a bit of money.
- notrealyme123 4y agoI can recommend kmonad for the same use cases full-heartedly. With Linux, Windows, Mac support and nice docs. https://github.com/kmonad/kmonad https://github.com/kmonad/kmonad
- xorry 4y agoSo this replaces setxkbmap, xmodmap, and xcape?
- focusaurus 4y agoYes. Plus you get layers and other more advanced features in the style of qmk.
- polyrand 4y agoAfter some time using Karabiner (still use it), I moved most of the remappings to skhd[0]. I find karabiner a bit too complex for just remapping a few combinations. The main reason I keep karabiner is because it lets you have a different behavior on key-tap vs. key-hold, and to remap Caps Lock to a combination of keys, i.e: map Caps Lock to "Ctrl + Option + CMD" instead of just a 1:1 mapping. [0]: https://github.com/koekeishiya/skhd https://github.com/koekeishiya/skhd
- asplake 4y agoOne nice feature of Karabiner is that mappings can be device-specific. I’ve mapped my presentation clicker’s Up and Down keys to the PgUp and PgDown needed by something I use.
- rkwasny 4y agoCan Karabiner use fn as a modifier key? fn+sth would be optimal additional shortcut layer
- notpushkin 4y agoI've made a JSON schema for the Karabiner Elements Complex Modification rule files: https://gitlab.com/notpushkin/karabiner-jsonschema/ https://gitlab.com/notpushkin/karabiner-jsonschema/
- Improvotter 4y agoWhy not use QMK [1]? Both of the author's keyboards (Anne Pro 2 and a TADA68) support QMK, there's a lot more to do with QMK, and it's on the keyboard itself. [1]: https://qmk.fm/ https://qmk.fm/
- D13Fd 4y agoQMK is not great, honestly, IMO. It’s very constrained in what it can do, especially without having to recompile, and a lot of it depends on your keyboard.
- fanf2 4y agoI am using Karabiner so that my modifier keys (shift/ctrl/alt/cmd) are global instead of per-keyboard, so that the modifiers on my main keyboard also affect my Keybow 2040 function pad. I would love to know of a simpler way to do it.
- alin23 4y agoI was also using Karabiner to launch/switch apps instantly but I got tired of editing large configs to add/remap keys to apps. Eventually I wrote rcmd (https://lowtechguys.com/rcmd https://lowtechguys.com/rcmd) to streamline this workflow of switching/launching an app by the first letter of its name. It will dynamically map Right Command + first letter of app name to already running apps, and you can map your own letters by just pressing Right Command + Right Option + letter to assign. I eventually replaced everything I was using Karabiner for with specialized apps like rcmd, HyperKey (https://hyperkey.app/ https://hyperkey.app/) and skhd (https://github.com/koekeishiya/skhd https://github.com/koekeishiya/skhd). I'm still missing the left/right Shift press once for parentheses, but I can live without it.
- user3939382 4y agoIt’s cool when the mapping is one to one. Once it’s one to many it’s a nightmare. You have to write scripts in a complicated format (full time professional programmer here) and they don’t even give you the facility to edit these scripts from within the app. https://karabiner-elements.pqrs.org/docs/json/external-json-generators/ https://karabiner-elements.pqrs.org/docs/json/external-json-... Why is it more complex to configure than an IDE? I don’t get it.
- ris58h 4y agoYou don't even need it for one to one mappings. hidutil is built-in with MacOS https://developer.apple.com/library/archive/technotes/tn2450/_index.html https://developer.apple.com/library/archive/technotes/tn2450...
- user3939382 4y agoI haven't looked into it, although I need device-specific (auto toggled) mappings. Part of the reason I need it in the first place is that macOS doesn't enforce Cmd+arrow or Home and End correctly across programs.
- ris58h 4y agoIt's possible to define device-specific mappings with hidutil https://github.com/amarsyla/hidutil-key-remapping-generator/issues/4 https://github.com/amarsyla/hidutil-key-remapping-generator/...
- deafpolygon 4y agoOr, maybe, don't use a 60%. How is tapping [ then ] to generate { a time-saver? Just seems like micro-optimization for very little gain. I use an 80% because I don't actually need the numpad (I can type at full speed using the number row instead of reaching over for the numpad). Using the arrow key without looking is simple because it's the only thing on the corner and I can return to the homerow easily without looking as well. It's faster for me to reach to it than to remap it to a Capslock (remapped to some other key) plus hjkl. Instead I'm a gamer, so I set Capslock to activate an extra layer and use WASD for the arrow set so I have a set of arrow keys for either hand. I like my Fn keys in groups of 4 across the top so I can easily reach for the correct one without looking.
- zephrx1111 4y agoJust uninstalled it. For some fancy keyboard like kinesis freestyle, it is not applicable. For some modern keyboard that supports VIA, its feature is under par and is useless.