pqrs-org / ke-complex_modifications Goto Github PK
View Code? Open in Web Editor NEWKarabiner-Elements complex_modifications rules
Home Page: https://ke-complex-modifications.pqrs.org/
License: The Unlicense
Karabiner-Elements complex_modifications rules
Home Page: https://ke-complex-modifications.pqrs.org/
License: The Unlicense
Thanks for such a great tool, but is it possible to write a rule to exchange modifier keys in a specific application?
Pleaseeeee pqrs-org/Karabiner-Elements#412
Hi there, first of all thanks for what you do.
I'm pretty new on Mac and i'm not a big fan of the iKeyboard, but my Bépo Typematrix 2030 keyboard, loose all its perks on MacOS without Karabiner support( cut/copy/paste on fn combination for the most part…).
It seems that it was supported on previous Karabiner version.
Do you think it will be again ?
Thanks.
Hello, I imported the rule "Changing numbers and symbols" but I want to edit it to keep showing numbers when pushing capslock+number instead of symbols, if someone can help please. Here is the original code :
{
"title": "Exchange numbers and symbols",
"rules": [
{
"description": "Exchange numbers and symbols (1234567890 and !@#$%^&*())",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "1",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "1",
"modifiers": [
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "2",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "2",
"modifiers": [
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "3",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "3",
"modifiers": [
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "4",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "4",
"modifiers": [
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "5",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "5",
"modifiers": [
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "6",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "6",
"modifiers": [
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "7",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "7",
"modifiers": [
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "8",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "8",
"modifiers": [
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "9",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "9",
"modifiers": [
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "0",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "0",
"modifiers": [
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "1",
"modifiers": {
"mandatory": [
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "1"
}
]
},
{
"type": "basic",
"from": {
"key_code": "2",
"modifiers": {
"mandatory": [
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "2"
}
]
},
{
"type": "basic",
"from": {
"key_code": "3",
"modifiers": {
"mandatory": [
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "3"
}
]
},
{
"type": "basic",
"from": {
"key_code": "4",
"modifiers": {
"mandatory": [
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "4"
}
]
},
{
"type": "basic",
"from": {
"key_code": "5",
"modifiers": {
"mandatory": [
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "5"
}
]
},
{
"type": "basic",
"from": {
"key_code": "6",
"modifiers": {
"mandatory": [
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "6"
}
]
},
{
"type": "basic",
"from": {
"key_code": "7",
"modifiers": {
"mandatory": [
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "7"
}
]
},
{
"type": "basic",
"from": {
"key_code": "8",
"modifiers": {
"mandatory": [
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "8"
}
]
},
{
"type": "basic",
"from": {
"key_code": "9",
"modifiers": {
"mandatory": [
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "9"
}
]
},
{
"type": "basic",
"from": {
"key_code": "0",
"modifiers": {
"mandatory": [
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "0"
}
]
}
]
}
]
}
On OS X El Capitan with karabiner-elements version 0.91.13, when I use the rule for KE-complex_modifications/src/json/shift_lr_to_caps.json.erb, pressing both shift keys turns on the caps_lock as expected. But pressing both keys again, doesn't turn off caps lock. I am not sure if its a bug or the expected behaviour, or just an issue with El Capitan.
I have been using karabiner for around 2 years. Not upgrading OS due to missing features in karabiner elements. I have been following the progress of karabiner elements, however. Thanks for everyone's effort. I might upgrade OS, once it has the features I require.
I've mapped Ctrl-Esc in MacOS' System Preferences to open Launchpad, and it works - until I open Karabiner Elements. Even with NO MAPPINGS enabled, Karabiner Elements prevents the Ctrl-Esc keyboard shortcut from opening Launchpad.
Any idea why?
I tried the escape complex rule, and also one on my own:
{
"title": "Capslock fine tunning",
"rules": [
{
"description": "Capslock: Maps capslock to ctrl_r except on Maltron/Ergotron",
"manipulators": [
{
"conditions": [
{
"type": "device_unless",
"identifiers": [
{
"vendor_id": 1240
},
{
"vendor_id": 7504
}
]
}
],
"type": "basic",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_control"
}
],
"to_if_alone": [
{
"key_code": "escape"
}
]
}
]
}
]
}
In both cases, nothing happened.
Any pointer?
Hello I use a german keyboard and I would like to type the é and è by simply pushing ö and ä. I don't understand what's wrong with my code if someone can help please. When I push :
"title": "Change ö and ä to é and è",
"rules": [
{
"description": "Change ö to shift+´+e",
"manipulators": [
{
"from": {
"key_code": "semicolon"
},
"to": [
{
"key_code": "equal_sign",
"modifiers": [
"shift"
"e"
]
}
],
"type": "basic"
}
]
},
{
"description": "Change ä to ´+e",
"manipulators": [
{
"from": {
"key_code": "quote"
},
"to": [
{
"key_code": "equal_sign",
"modifiers": [
"e"
]
}
],
"type": "basic"
}
]
}
]
}
Could you please add this complex modification rule: https://www.marenauta.com/command_arrows_to_option_arrows.json to the page https://pqrs.org/osx/karabiner/complex_modifications/
IE can I map
[
from: {
key_code: k ... modifiers: ctrl
},
to: {
sequence: [ { key_code: right_arrow ... modifiers: cmd, shift}, {key_code: delete} ]
}
]
I believe the title covers it.
i tried to put the fn key on caps but its not working
any known problem?
Our listing of mappings is getting quite long. I suggest we refactor it so that json files can be grouped and collapsed. That will allow for a bit better organization.
There is a setting "lazy": true
on line 264 of 'https://github.com/pqrs-org/KE-complex_modifications/blob/master/src/json/personal_tekezo.json.erb'. In what case should this "lazy": true
setting be used?
I tried and tried to find out how to use the setting "lazy": true
, but I could not grasp the details.
Does anyone know how to use the setting "lazy": true
?
I am using https://pqrs.org/osx/karabiner/complex_modifications/#personal_settings (by @apm1467).
I wanted to map Vi like navigation w/o any modifier key - preferably just Q and W or any two adjacent keys. Can it be done? If so, how should I go about it?
Hello, I wonder if it's possible to configure kind of sticky key. For example, I wan't to press F13, release it and treat any key pressed after F13 release in a special way.
Thus, I can press two keys each after another, not simultaneously.
In the classic Karabiner era I used the following config for that purpose:
<item>
<name>Command Mode</name>
<appendix>Enable by pressing F13</appendix>
<identifier>private.command_mode</identifier>
<autogen>__KeyToKey__
KeyCode::F13, KeyCode::VK_STICKY_COMMAND_MODE
</autogen>
</item>
Is it possible to achieve the same behaviour with Karabiner Elements?
Is it possible?
I have simple modifications working to swap fn
and left_control
, and then I have complex modifications to change left_control
to left_command
in some situations like left_control + c
(trying to emulate windows).
In the old Karabiner, these rules omitted the terminal app because ctrl + c
was required to break out of a running process, now these key swaps are OS wide. Any way to omit the Terminal.app
?
I have this complex mapping:
{
"description": "Change F6 to Left_command + L",
"manipulators": [
{
"from": {
"key_code": "f6",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "l",
"modifiers": [
"left_command"
]
}
],
"to_if_alone": [
{
"key_code": "l",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
}
]
}
When pressing F6, it should trigger cmd + L
(this is to select input bars like the url bar in chrome browser), but doesn't.
As of 0.91.13, device-specific complex modifications can be defined by using the device_if
or device_unless
condition types as shown here. While you can define device-specific simple modifications in a device object, currently, complex_modifications
key:value settings are only recognized on the root level of a profile.
(i.e.,"profiles": [ { "complex_modifications": { ... } } ]
)
For example, the following will not work:
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": {},
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 50475,
"vendor_id": 1133
},
"ignore": false,
"simple_modifications": {},
"complex_modifications": { ... }
}
]
The ellipsis (...) is not literal, i.e., the actual JSON for the complex modification(s) is left out.
Adding complex_modifications
support in device objects seems logical, and makes for a more convenient way to add device-specific complex modifications. Please add this support in the next release.
Looking for a touchpad application between the sliding function
In full-screen display between the sweep
I'm trying to created a complex modification for Safari that remaps a Ctrl-Click to a Command-Click. I can create a modification that simply remaps left-control to left-command, and that works - but then of course it interferes with other shortcuts, like Ctrl-W, Ctrl-Tab, etc. I CAN create additional modifications for each of those shortcuts, but that's a bit of a pain. I've tried utilizing the "to_if_alone" mapping option, but it appears to do nothing (I'm guessing because the Ctrl-CLICK is recognized as "not alone"). Is there another option I can use to only map keys when used in conjunction with a mouse click?
Is it possible or can someone point me in the right direction as to implementing something similar to a custom (without modifiers) layer?
I'd like to be able to implement something like a customisable caps-lock/layer/mode (e.g., when on, have arrow keys or "numpad" [or whatever] available without having to press a modifier).
Hoped that the Media Keys for the Pok3r would also work with the Vortex Core (some manufacturer etc.) which isn't the case. Is this intended and might a small change activate my beloved media keys on my Core again?
I put my modified .json file in the local assets/complex_modifications folder. Now how do I get my rules to show up? The Github page says something about updating within KE's preferences, but I don't find any update button for rules (I remember that feature in Karabiner). Am I blind or have I fundamentally misunderstood something? Feeling pretty dumb right now ...
I don't see any examples requiring a button to be hit twice. Any suggestions where I can start to learn how to code this?
Would it be possible to get an entry added for these:
Thank you!
Is there a way to have the Vi mode complex modifiers be used to select text while shift is held down? For example, I would love to be able to press ⌃+⇧+h to select the character to the left, like pressing shift and the left arrow key does. Being able to hold ⇧+⌥+h to select all the preceding characters in the current word and ⇧+fn+h to select the preceding characters in the paragraph like ⇧+⌥+← and ⇧+fn+← do respectively would make this even better. Thanks!
I can't see a key to import complex configs anywhere in preferences - which screen should it appear on?
I also can't see a comment in the log that it's looking in there for files at start-up.
I try to map "shift + escape" to "~", my json file is as follows:
{
"description": "Change shift + esc to ~",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "escape",
"modifiers": { "mandatory": [ "left_shift" ] }
},
"to": [
{
"key_code": "grave_accent_and_tilde",
"modifiers":{
"mandatory":[ "left_shift" ]
}
}
]
}
]
}
However, I got "`" character instead of "~" when I type esc with shift :(
It seems that it's half mapped...
So the Matias Ergo Pro keyboard is missing a right option key. This bugs me because I often use the option key to type åøæ when typing Norwegian, as this saves me having to switch keyboard layouts. How would I go about setting up this mapping?
Seems like when I have a certain combination of modifiers, it only triggers on a key-up
event.
I have these simple modifications:
My complex mods look like this:
{
"rules": [
{
"description": "Change Left_control + C to Left_command + C",
"manipulators": [
{
"from": {
"key_code": "c",
"modifiers": {
"mandatory": [
"left_control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "c",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Change Left_control + X to Left_command + X",
"manipulators": [
{
"from": {
"key_code": "x",
"modifiers": {
"mandatory": [
"left_control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "x",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Change Left_control + V to Left_command + V",
"manipulators": [
{
"from": {
"key_code": "v",
"modifiers": {
"mandatory": [
"left_control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "v",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Change Left_control + Z to Left_command + Z",
"manipulators": [
{
"from": {
"key_code": "z",
"modifiers": {
"mandatory": [
"left_control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "z",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Change Left_control + A to Left_command + A",
"manipulators": [
{
"from": {
"key_code": "a",
"modifiers": {
"mandatory": [
"left_control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "a",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Change Left_control + W to Left_command + W",
"manipulators": [
{
"from": {
"key_code": "w",
"modifiers": {
"mandatory": [
"left_control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "w",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Change Left_control + S to Left_command + S",
"manipulators": [
{
"from": {
"key_code": "s",
"modifiers": {
"mandatory": [
"left_control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "s",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Change Left_control + T to Left_command + T",
"manipulators": [
{
"from": {
"key_code": "t",
"modifiers": {
"mandatory": [
"left_control"
]
}
},
"to": [
{
"key_code": "t",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Change Shift + Left_control + T to Shift + Left_command + T",
"manipulators": [
{
"from": {
"key_code": "t",
"modifiers": {
"mandatory": [
"left_shift",
"left_control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "t",
"modifiers": [
"left_shift",
"left_command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Change Left_control + F to Left_command + F",
"manipulators": [
{
"from": {
"key_code": "f",
"modifiers": {
"mandatory": [
"left_control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
}
]
}
],
"title": "Windows Mode"
}
They all work except the ctrl + shift + t
mod "Change Shift + Left_control + T to Shift + Left_command + T".
This is to re-open tabs in apps that support this feature i.e. chrome browser.
It doesn't trigger when I press the key combination, but when I let go of just shift
(while keeping the other two keys pressed), it triggers. I thought that maybe it was conflicting with the ctrl + t
key so I removed that but same behaviour occurs.
I'm not able to make this work. I'm a noob, and there is no precise easy-to-follow guide on how to make my own complex modifications. So I probably did something wrong.
Goal is to have fine Volume controls without needing to press Option and Shift as well. I was surprised there isn't a ready model for this, as I've wanted this for years! Can it be done?
On British English keyboard I have key §, ±
in place of ` key of US English
What is name definition of this key?
When in terminal I have command be control, but want the usual command keys to be available if I add shift.
My muscle memory thanks you!
I'm trying to make a new complex modification for changing a single key (insert) into a keystroke (option + esc). When I press insert, it's as if I never "let go" of option. See Event Viewer snippets below.
This really feels like I'm not writing the json correctly, as opposed to a bug. It's my first time writing a complex modification, so Occam's Razor suggests PEBKAC ;)
personal_wgj.json.erb
{
"title": "Personal rules (@wgj)",
"rules": [
{
"description": "Change insert to left_option+escape (VoiceOver)",
"manipulators": [
{
"type": "basic",
"from": <%= from("insert", [], ["any"]) %>,
"to": <%= to([["escape", ["left_option"]]]) %>
}
]
}
]
}
left_option + esc
eventType:FlagsChanged code:0x3a name:left_option flags:Opt misc:
eventType:FlagsChanged code:0x3a name:left_option flags: misc:
insert
eventType:FlagsChanged code:0x3a name:left_option flags:Opt misc:
Turns on caps lock. Doesn't turn off caps lock.
In KE there's an option to disable built-in keyboard when a USB keyboard is attached. What I would like to do is to be able to use this detection to do a key swap. Is such a condition supported?
Karabiner can change fn key to Hyper key - command+control+option+shift, just like "Change caps_lock key", will Karabiner-Elements support this feature?
I'd like to add the following maps to Karabiner Elements, but I'm not clear how to do it.
Home - Command-C
End - Command-V
PageUp - Command-Alt-Shift-V
PageDn - Command-Shift-V
The simple modifications only lets me add one key, and the complex modifications only lets me download existing rules. How Do I create those mappings? I see in the docs for Karabiner about private.xml, but that doesn't seem to be in Karabiner Elements. Thanks.
Hello, excuse me for being a complete noob I tried to understand somehow the Wiki to bind this but can't find the good rule so if someone can help please. I have a german keyboard on a Macbook Air and in brief I would like to change ß by ? but also # by ' . So from what I understood in the key definitions and the codes :
I was thinking if someone can create a rule to change :
Thanks a lot !
Please help me to set Shift+Backspace=Delete?
Which file to edit and what to put inside.
Thank you
I.E. ctrl-e/ctrl-a/ctrl-k being overridden system wide to always force move-to-end/move-to-start/delete-to-end? I hate how some applications (anything Microsoft/Anki/many webpages) override these I'm trying to figure out a way to overrule them.
e.g. when remap one key only for specific (non-english) lang.
Hi guys,
First of all I'd like to thank you for your work!
I would like to use Karabiner-Elements
to fix an issue of Mac OS that I really hate. Long story short, I want the three keys Play (F8)
, Preview (F7)
, and Next (F9)
to work only in Spotify
, no matter the frontmost app.
I decomposed my problem in these four steps:
Stop launching iTunes
automatically when pressing the Play Button (F8)
while in the Finder
(or also in other apps);
Disable Play (F8)
, Preview (F7)
, and Next (F9)
keys in iTunes
;
Disable the Play Button (F8)
in Apple Keynote
(by default it will start the presentation);
Forward the Play Button (F8)
from Apple Keynote
—or other apps—to Spotify
.
I managed to solve points 2. and 3. by adding two complex modifications
in karabiner.json
to replace the respective key with vk_none
. It follows a sample condition:
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.apple\\.iTunes$"
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "f8",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "vk_none"
}
],
"type": "basic"
}
However, I would be super happy if you could kindly help me in points 1 and 4.
Thank you very much in advance for your help, and please keep up the good work!
Roberto
P.s. I attach my karabiner.json for further reference.
In events view, my help key produces
eventType:KeyDown code:0x72 name:help flags:Fn misc:
eventType:KeyUp code:0x72 name:help flags:Fn misc:
so, I made the following rule
{
"type": "basic",
"from": {
"key_code": "help",
"modifiers": {
"mandatory": [
"Fn"
]
}
},
"to": [
{
"key_code": "play_or_pause",
}
]
}
But it doesn't seem to work, regardless of whether i include the fn flag or not. Can ya point me in the right direction? Thanks!
Currently now we have only
I have an external keyboard attached to my mac (Matias Ergo Pro). I used to use https://github.com/jgosmann/Karabiner-Elements-Neo on 10.11 which worked perfectly. I had to update to 10.13 for unrelated reasons and found that the fork is no longer maintained.
Unfortunately, the new blessed way only works for my internal keyboard, but not for the externally attached one.
@jgosmann I see you just freshly created the Neo2 files in this repository - thanks for working on this! Can I provide any more information to debug the issue at hand?
Hello,
First thanks a lot for all your work on Karabiner!
I'm wondering if dvorak (or bépo) layouts will be included in Karabiner Elements has they were in previous versions of Karabiner?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.