• You are not logged in.

For Mac users: Colemak D-H curl, Tarmak, angle/wide and extend

  • Started by mkborregaard
  • 44 Replies:
  • Reputation: 51
  • From: UK
  • Registered: 14-Apr-2014
  • Posts: 648
DreymaR said:

Also, since there's now a new Curl(DH) mod to rule them all and in the dorkness bind them... any takers for the Mac implementation of that? :-)

A user previously contributed this for the original DH
https://github.com/ColemakMods/mod-dh/tree/master/OS_X

I assume it would be a good starting point as all that would be needed is an M-K switch.

Last edited by stevep99 (19-May-2017 18:30:22)

Using Colemak Mod-DH with some additional ergonomic keyboard mods.

Offline
  • 0
  • Reputation: 90
  • From: Oslo, Norway
  • Registered: 13-Dec-2006
  • Posts: 4,505

Certainly nice work by 39aldo39 there! However, it's only Colemak and not the Tarmak layouts or more importantly, Extend!

Apparently, Extend is still broken for Mac after OSX Sierra. Too bad.

*** Learn Colemak in 2–5 steps with Tarmak! ***
*** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

Offline
  • 0
  • Reputation: 0
  • Registered: 05-Dec-2014
  • Posts: 6

Hey there. Do you think this is possible to implement with the recent changes made to karabiner-elements? (They added 'complex-modifications' support)
Do you have time to dig into this? Perhaps I could help by any means?

* docs: https://github.com/tekezo/Karabiner-Ele … ifications
* complex mods repo: https://github.com/pqrs-org/KE-complex_modifications

Or did you find any other solution to this? I miss extend so hard, since I switched to macOS. This is killing my experience :(((

Offline
  • 0
  • Reputation: 90
  • From: Oslo, Norway
  • Registered: 13-Dec-2006
  • Posts: 4,505

I feel your pain. Extend is a habit-forming drug...!

I'm not a Mac user, but I'm tempted to look into it. However, my hands are more than full so I have no idea when I might be able to get around to it.

Meanwhile, if you can afford a Hasu USB-2-USB device or have the skillz to hook up a microcontroller yourself it'll save you (unless you use a Bluetooth keyboard and can't intervene a USB device). That's what saves me at work where the IT department has total paranoia.

Last edited by DreymaR (04-Jul-2017 08:37:54)

*** Learn Colemak in 2–5 steps with Tarmak! ***
*** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

Offline
  • 0
  • Reputation: 0
  • Registered: 05-Dec-2014
  • Posts: 6

Where can I get this device and how can I use it to get extend working?
EDIT: I have found it on this forum, thanks. But I am using a Macbook Pro. So it would confuse me rather more, because I constantly switch between laptop and my mechanical keyboard at the docking station.

I think I will fiddle around with the new karabiner complex modifications then. Perhaps I can find a solution to this. (Navigation layer only first.)

Last edited by uloco (04-Jul-2017 13:53:38)
Offline
  • 0
  • Reputation: 90
  • From: Oslo, Norway
  • Registered: 13-Dec-2006
  • Posts: 4,505

Best of luck!

While I think it'd be possible to get used to having Extend on the mech board and not on the laptop board, I agree that it'd be confusing. With my TMK files it'd be possible to make an Extend-only device so you could use the same layout otherwise. But yeah, I feel your pain.

*** Learn Colemak in 2–5 steps with Tarmak! ***
*** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

Offline
  • 0
  • Reputation: 15
  • Registered: 12-Sep-2016
  • Posts: 44

I have created a modifications file for Karabiner-Elements which implements Extend here. Open

karabiner://karabiner/assets/complex_modifications/import?url=https://gist.githubusercontent.com/39aldo39/72cd3af3e90ce70b5f1257e815ad912a/raw/52475bf5ed4565f5ab21ac889d29db21420decdf/extend.json

in a web browser to import it directly in Karabiner. (It is not allowed to use non-http protocols in links.) It is still needed to set an extend key in the simple modifications tab with 'to key' as 'fn'. It works independent from the layout, which is nice. The modifiers where a bit tricky to implement, since they remove the extend key. But they work by defining them as modifier+extend. Mouse keys aren't supported by Karabiner-Elements though.

Last edited by 39aldo39 (07-Jul-2017 19:34:38)

Create advanced keyboard layouts in various formats using my Keyboard Layout Files Creator!

Offline
  • 2
  • Reputation: 90
  • From: Oslo, Norway
  • Registered: 13-Dec-2006
  • Posts: 4,505
39aldo39 said:

I have created a modifications file for Karabiner-Elements which implements Extend here. Click here to import it directly in Karabiner.

Aldo, that's great! I'm not so clever at reading json code, but I take it you implemented the standard Extend1 layer minus mouse keys then?

Maybe we should think up something practical to put on the missing keys, then. There's a pair or two of up-down keys and a horizontal block begging for some love. If the mousewheel isn't working either (which is a pity), then those keys could be used for the GUI key and something else. Tempting to put GUI on W for "Win key" but more logical to put it on R in line with the other modifiers. W could be a configurable user key. I'm tempted to say "Close" but that's too catastrophe-prone. Ctrl-T is a nice combo for opening new tabs; maybe people would like to have that handy.

What else, I wonder?

Last edited by DreymaR (07-Jul-2017 16:46:18)

*** Learn Colemak in 2–5 steps with Tarmak! ***
*** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

Offline
  • 0
  • Reputation: 15
  • Registered: 12-Sep-2016
  • Posts: 44

I implemented the standard Extend1 layer minus mouse keys and mousewheels. Those keys can be mapped to something different, but Karabiner-Elements still adds features which stopped working with Sierra. So, they will be probably supported after some time. But they can be mapped to something different in the meantime, of course. However, the GUI key is already mapped as CMD (Ctrl has moved to Q) and other CMD combos aren't really needed imo, since the CMD is on a nice position.

Create advanced keyboard layouts in various formats using my Keyboard Layout Files Creator!

Offline
  • 0
  • Reputation: 90
  • From: Oslo, Norway
  • Registered: 13-Dec-2006
  • Posts: 4,505

What I'd do then, is to map an extra pair of Up/Down to the mouse wheel Extend keys (W/R) as they do a bit of the same when scrolling. I think I did that for my TMK files.

[If F/P aren't remapped with BrowserBack/Forward, Alt+Left/Right do the same in many cases.]

For the mouse movement keys, maybe Ctrl+Left/Right/Up/Down for now? Those can be handy and this way reduces chording a bit (at the cost of stretching). They'll be remapped when the proper mouse keys are back up, so it's no biggie anyway. But that's a good placeholder I think.

Not sure what to do with the buttons 1/2/3 then. Button 1 can be Space for now, as normal Space is missing in the Extend layer and it can be handy in some dialogues. Button 2 can be an extra Menu key as that is often its function. Then I'd make Button 3 into Ctrl+T as mentioned, as a middle click will sometimes make a new tab.

[Edit: So you've got proper mouse buttons working. Nice!]

Did you lose Esc on Q? I find that very convenient indeed, not only for Vim but for dialogs too! Any other deviations?

Last edited by DreymaR (26-Mar-2018 12:51:50)

*** Learn Colemak in 2–5 steps with Tarmak! ***
*** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

Offline
  • 0
  • Han
  • New member
  • Reputation: 0
  • Registered: 14-May-2017
  • Posts: 2

This is really cool! Thanks a lot!! I'll try it out when on my mac at work tomorrow. But I see you're using the 'fn' key as the key to make a switch to the extend layer. Is that a personal preference, or is it impossible to use the caps lock as the access to extend?

Edit: I first tried replacing "fn" with "caps_lock", that worked, sort of, but for every key I had to re-press caps_lock, not so practical. But just by adding the additional mapping of caps_lock to fn, I solved it. (combination like shift+option+arrow are now comfortable again)

Last edited by Han (13-Sep-2017 10:47:56)
Offline
  • 0
  • Reputation: 3
  • Registered: 29-Apr-2015
  • Posts: 23

When I try to use that extend layer the keys move around depending on my layout - so e.g. "arrow-up" follows my 'i' over to what's marked as the 'L' key on my qwerty keyboard. Is there a nice way to ensure that the extend layer gets mapped to the keys before Karabiner-Elements moves them to their Colemak(DH) position? There was in the old Karabiner, which made the extend layer very easy to combine with the various Tarmak/Colemak layouts.

Also, sorry I've let this stew. With Karabiner-Elements new "Profile" feature it should be easy for me to port the old Karabiner functionality to Karabiner-Elements. I'll do it as soon as I catch a minute. Unfortunately it does not seem possible to have "wide" and "angle" layouts as extra add-ons, they have to be built into the layout AFAICS?

Offline
  • 0
  • Reputation: 90
  • From: Oslo, Norway
  • Registered: 13-Dec-2006
  • Posts: 4,505

Ah, modularity is so nice and the lack of it not so nice. ;-)

If modular ergo mods aren't available, I'd suggest not making all possible combinations as that's madness. Maybe just one vanilla and one fully-modded variant? That is, on ISO boards I'd really consider a plain Angle mod a part of the "vanilla" package, personally. And maybe the full CurlAngleWide mod is too much for some? At any rate, we'd need the CurlAngleWide(Slash) for PC105/ISO and CurlAngle(Z)Wide(Quote) for PC104/ANSI boards, so it's a bit of a hassle.

So, all in all that's:
• Unmodded ANSI
• CurlAngle(Z)Wide(') ANSI
• Angle ISO
• CurlAngleWide(/) ISO

That's enough to discourage making more combos I think. ;-)

One slightly annoying thing about the new Curl(DH) mod is that it splits the ZXCV block so Extend should have "Button1" mapped to the D which is now between C (Cut) and V (Paste) (if mouse buttons are available now, that is). But it's no biggie once you get a little used to it!

Last edited by DreymaR (24-Oct-2017 13:32:43)

*** Learn Colemak in 2–5 steps with Tarmak! ***
*** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

Offline
  • 1
  • Reputation: 15
  • Registered: 12-Sep-2016
  • Posts: 44

I don't know of a way to apply the extend layer before other remappings. However, the extend layer should work independent from the system layout (keylayout files). You might want to use those. With my KLFC program you can also easily create the layouts for different mods.

Another issue with Karabiner-Elements is that the 'to-keys' are layout dependent. So, with Colemak(DH) active, you have to modify the Paste modification.

I also updated the json file with support for mouse buttons.

Create advanced keyboard layouts in various formats using my Keyboard Layout Files Creator!

Offline
  • 1
  • Reputation: 1
  • Registered: 15-Apr-2018
  • Posts: 4

I have created a file for Karabiner-Elements which implements mouse/scroll wheel movement. I don't know all the mac equivalents for certain commands so I filled in the blanks with whatever I could think of:

- F key row has been left untouched since it already has media keys (escape is caps lock however)
- "Grave Accent" has been mapped to "Eject"
- "Backspace" has been mapped to "Force Quit (command/option/escape)"
- "Close Bracket" has been mapped to "Spotlight Search (command spacebar; adding option to this opens the finder)"
- "Backslash" has been mapped to "Launchpad"
- "Quote" has been mapped to "Mission Control"
- "Slash" has been mapped to "Mac control (this definitely needs a better spot)"

To install: open Spotlight Search, type the following without quotes "~/.config", look for the Karabiner folder, then copy/paste the json file into the Complex Modifications folder.

If you want to edit the mouse/scroll wheel speed: open the json file with Text Edit, then use command/F to find the numbers 1536 for mouse movement (should get 4 hits) and/or 32 for scroll speed (2 hits). These values are the default speeds you'd get from the standard mouse up/scroll up mappings in Simple Modifications. The fast/slow speed options for those commands are double/half the default (i.e., mouse up is |1536| while mouse up fast is |3072|). Simply use find/replace to edit the speeds to your liking (don't add a negative sign to your search; just stick with the absolute value).

I think for Mac a few things need to be moved around but this should be a decent starting point. If you have any suggestions/know various mac equivalents for windows commands let me know.

Last edited by BenDover178 (28-Jun-2018 08:14:32)
Offline
  • 1
  • Reputation: 90
  • From: Oslo, Norway
  • Registered: 13-Dec-2006
  • Posts: 4,505

Nice work!

I'll get back to the details, I guess. And the Ergo mod combos – phew!

Last edited by DreymaR (28-Jun-2018 08:58:44)

*** Learn Colemak in 2–5 steps with Tarmak! ***
*** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

Offline
  • 0
  • Reputation: 1
  • Registered: 13-May-2017
  • Posts: 69
BenDover178 said:

I have created a file for Karabiner-Elements which implements mouse/scroll wheel movement. I don't know all the mac equivalents for certain commands so I filled in the blanks with whatever I could think of:

- F key row has been left untouched since it already has media keys (escape is caps lock however)
- "Grave Accent" has been mapped to "Eject"
- "Backspace" has been mapped to "Force Quit (command/option/escape)"
- "Close Bracket" has been mapped to "Spotlight Search (command spacebar; adding option to this opens the finder)"
- "Backslash" has been mapped to "Launchpad"
- "Quote" has been mapped to "Mission Control"
- "Slash" has been mapped to "Mac control (this definitely needs a better spot)"

To install: open Spotlight Search, type the following without quotes "~/.config", look for the Karabiner folder, then copy/paste the json file into the Complex Modifications folder.

If you want to edit the mouse/scroll wheel speed: open the json file with Text Edit, then use command/F to find the numbers 1536 for mouse movement (should get 4 hits) and/or 32 for scroll speed (2 hits). These values are the default speeds you'd get from the standard mouse up/scroll up mappings in Simple Modifications. The fast/slow speed options for those commands are double/half the default (i.e., mouse up is |1536| while mouse up fast is |3072|). Simply use find/replace to edit the speeds to your liking (don't add a negative sign to your search; just stick with the absolute value).

I think for Mac a few things need to be moved around but this should be a decent starting point. If you have any suggestions/know various mac equivalents for windows commands let me know.

Thanks alot mate :)
Modified this a bit so that now extend q would be control instead of escape. :)
Full credits: @BenDover178 :)

Last edited by abhixec (28-Sep-2018 21:29:12)
Attachments:
Offline
  • 0
  • Reputation: 90
  • From: Oslo, Norway
  • Registered: 13-Dec-2006
  • Posts: 4,505
abhixec said:

Modified this a bit so that now extend q would be control instead of escape. :)

Because there's both a Ctrl and Option on MacOS, I see. But is the number of Ctrl+<non-letter> shortcuts large enough to warrant losing the quite practical one-hand Esc? I guess that'll be somewhat of a matter of preference...?

There's still the Ext+LBr Esc of course, but it's more of a reach.

Last edited by DreymaR (01-Oct-2018 08:50:22)

*** Learn Colemak in 2–5 steps with Tarmak! ***
*** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

Offline
  • 0
  • Reputation: 1
  • Registered: 08-Oct-2018
  • Posts: 2

Karabiner-Elements uses massive JSON config files to accomplish its complex mappings. To implement Extend, it takes 1200+ lines! That makes customizing or even seeing what its doing a tricky endeavor. We're all keyboard layout nerds, right? Customizing should be possible. Especially since some of the Extend choices are... questionable on a Mac (menu and insert, I'm looking at you... some of the mouse movement and the additional modifiers too).

Anyway, I wanted a way to generate my Extend config so that I could easily customize it. So, I have published a Python script that does just that. It lets you easily customize and generate a Karabiner-Elements Extend JSON file. The project is hosted here: https://github.com/mattmc3/colemak-tool … /Karabiner. The script attempts to stick closely to the default Extend as DreymaR defined it originally so that you can make your own customizations instead of taking mine.

The well commented Python script weighs in at about 250 lines of fairly readable code. Here is a sample from the QWFP row definition:

### top row ###
extend.add_key_mapping("q", "esc")
extend.add_mouse_scroll_mapping("w", "y", Direction.UP)  # mouse scroll up
extend.add_key_mapping("f", "[", "left_command")  # browser back in safari is CMD-[
extend.add_key_mapping("p", "]", "left_command")  # browser forward in safari is CMD-]
extend.add_mouse_move_mapping("g", "y", Direction.UP)  # mouse move up
extend.add_key_mapping("j", "page_up")
extend.add_key_mapping("l", "home")
extend.add_key_mapping("u", "up_arrow")
extend.add_key_mapping("y", "end")
extend.add_key_mapping(";", "delete_forward")
extend.add_key_mapping("[", "esc")
extend.add_key_mapping("]", "insert")

If Python or coding is not your thing, the generated JSON file is available for download here. Or, follow the directions on the site README to download and install the config. Let me know if you find any bugs, and if you are a fellow Python dev, feel free to contribute with a PR.

Works on Sierra, High Sierra, and Mojave. Haven't tested anything below that.

Last edited by mattmc3 (09-Oct-2018 23:20:45)
Offline
  • 1
  • Reputation: 90
  • From: Oslo, Norway
  • Registered: 13-Dec-2006
  • Posts: 4,505

Nice of you to put in work on this, MattMc! How is the modularity of your script? That is, could it handle the need to select no ergo mods or Angle, AngleWide, CurlAngleWide maybe with locale and other variants for both ISO and ANSI systems etc?

Last edited by DreymaR (04-Dec-2018 09:45:57)

*** Learn Colemak in 2–5 steps with Tarmak! ***
*** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

Offline
  • 0