Karabiner-elements: Support for caret (^) and angle brackets (<, >)

Created on 17 Jan 2017  路  9Comments  路  Source: pqrs-org/Karabiner-Elements

Please add support for '^' and '<' keys

Most helpful comment

non_us_backslash and grave_accent_and_tildeworked for me

All 9 comments

Look at the last example on https://github.com/tekezo/Karabiner-Elements/blob/master/usage/README.md
Swap non_us_backslash and grave_accent_and_tilde.
It doesn't work for me though. I used to swap those keys using GERMAN_LESS_THAN and GERMAN_CIRCUMFLEX in Karabiners private.xml.

non_us_backslash and grave_accent_and_tildeworked for me

Need to change ^掳 and <> key on a keyboard with german keyboard layout. When adding a simple modification, I can not see those characters in the list. Tried the suggestion from comment 3 without success. Any idea how that would be handled?

Perhaps my comment was too brief. Here is the working swap for german keyboards:

cat ~/Library/Application\ Support/Karabiner/private.xml

<?xml version="1.0"?>
<root>
  <item>
    <name>Swap Less-Than and Circumflex</name>
    <identifier>private.swap_lessthan_and_circumflex</identifier>
    <autogen>__KeyToKey__ KeyCode::GERMAN_LESS_THAN, KeyCode::GERMAN_CIRCUMFLEX</autogen>
    <autogen>__KeyToKey__ KeyCode::GERMAN_CIRCUMFLEX, KeyCode::GERMAN_LESS_THAN</autogen>
  </item>
</root>

@zuckschwerdt : XML configuration is used in older versions. Latest versions use JSON.

Need to change ^掳 and <> key on a keyboard with german keyboard layout. When adding a simple modification, I can not see those characters in the list. Tried the suggestion from comment 3 without success. Any idea how that would be handled?

You can get key code of a key/button with EventViewer [1].

[1] Karabiner-Elements menu > Launch EventViewer or Karabiner-EventViewer.app.

@MuhammedZakir how embarrassing, Karabiner works so smoothly* I totally forgot about that change. I currently use a mapping of "from": {"key_code": "grave_accent_and_tilde"}, "to": {"key_code": "non_us_backslash"} and "from": {"key_code": "non_us_backslash"}, "to": {"key_code": "grave_accent_and_tilde"}

(*) the only feature missing is the ability to read HID CONSUMER events from an alternate interface, I use a small helper to translate the media keys for that.

(*) the only feature missing is the ability to read HID CONSUMER events from an alternate interface, I use a small helper to translate the media keys for that.

@zuckschwerdt: Can you please share the script? That will be helpful! :-)

Can you please share the script?

It's just a simple C program tailored for the Microsoft Ergo 4000. It opens the alternate interface (Page 12 (Consumer), Usage 1 (Consumer Control), instead of Page 1 (Generic Desktop Controls), Usage 6 (Keyboard)) and maps specific events. E.g. CONSUMER 0x01, 0x2e, 0x02 (ZOOM_OUT) to tap_key(48, LCMD | LSHIFT). I doubt anyone else needs exactly that mapping ;)

Can you please share the script?

It's just a simple C program tailored for the Microsoft Ergo 4000. It opens the alternate interface (Page 12 (Consumer), Usage 1 (Consumer Control), instead of Page 1 (Generic Desktop Controls), Usage 6 (Keyboard)) and maps specific events. E.g. CONSUMER 0x01, 0x2e, 0x02 (ZOOM_OUT) to tap_key(48, LCMD | LSHIFT). I doubt anyone else needs exactly that mapping ;)

Actually, I really like to look at other's code and see how they do it. 馃槈 Besides, I think the script may help people who are not familiar with programming; they will know where to start and how to do it. :-) Anyway, it was just to satisfy my curiosity! 馃槃

Was this page helpful?
0 / 5 - 0 ratings