You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m currently working on simplifying the configuration generation process. As a new user, I’m eager to learn about the rules and features that user's frequently uses. Could you please share some insights and configs?
Creating configuration files for Karabiner-Elements can be challenging. With Karabiner-Human-Config (KHC), you can effortlessly generate your own configuration files using human-readable/understandable syntax.
Instead of repeating the same key beginning, use group keys.
{
- "fn": { "t": "fn", "a": "cmd tab" },- "fn spacebar": "cmd spacebar",- "fn v": "$ open -a 'Visual Studio Code'",+ "fn": {+ "_self": { "t": "fn", "a": "cmd tab" },+ "spacebar": "cmd spacebar",+ "v": "$ open -a 'Visual Studio Code'"+ }
}
Note: Currently, _self is required to create a group key.
Application Group Keys
Use application names if you want to specify key mappings for a specific application. Don't worry about finding bundle identifiers, just use the app name.
Hi guys,
I’m currently working on simplifying the configuration generation process. As a new user, I’m eager to learn about the rules and features that user's frequently uses. Could you please share some insights and configs?
https://github.com/nrjdalal/karabiner-human-config
Karabiner-Human-Config
The easiest way to write Karabiner-Elements configuration files, ever!
Find it on the official website of Karabiner-Elements at external JSON generators.
Creating configuration files for Karabiner-Elements can be challenging. With Karabiner-Human-Config (KHC), you can effortlessly generate your own configuration files using human-readable/understandable syntax.
Usage
Just create a new
konfig.json
file:caps
hyper
cmd
ctrl
etc.t
a
etc as manipulator key's aliases.100
easily, if needed.$
for shell command.Visual Studio Code
.And run the following command:
And voila! From 10-15 lines to 170+ lines of configuration in just a few seconds.
Generated: karabiner.json
The generated configuration will be saved in
karabiner.json
in the same directory.Bonus: If you wish to checkout my personal configuration, you can find it here.
And what it generates here.
Table of Contents
CLI Usage
With Default Options
With Custom Input and Output
You can use either/both of the options.
Types of Addressing
Comments
Don't hold back on the comments. They are your best friend. KHC will strip them out before generating the configuration.
Direct Keys
Use
string
values if there's onlyto
event. In case of multiple events, useobject
values. Read more at specifying multiple events.Group Keys
Instead of repeating the same key beginning, use group keys.
Note: Currently,
_self
is required to create a group key.Application Group Keys
Use application names if you want to specify key mappings for a specific application. Don't worry about finding bundle identifiers, just use the app name.
Advanced Usage for From Events
Optional Modifiers
Use
|
to specify optional modifiers.Generated: karabiner.json
Advanced Usage for To Events
Shell Command
Use
$
to specify a shell command.Generated: karabiner.json
Prefix Delay and Flags
Prefix with
lazy
,repeat
,halt
to set flags. Ornumber
to specify a delay.Generated: karabiner.json
Specify Multiple Events
Instead of strings, use objects like
{ to: ..., to_if_alone: ... }
to specify multiple to events.Generated: karabiner.json
Alias
Custom Aliases
hyper
forleft_command left_control left_option left_shift
left_command
ascmd
lcmd
l_cmd
left_cmd
lcommand
l_command
Check and add custom-aliases.ts for more.
Manipulator Key's Aliases
t
forto
a
forto_if_alone
h
forto_if_held_down
Check and add manipulator-keys.ts for more.
Future Considerations
The text was updated successfully, but these errors were encountered: