Author Topic: modifier^2 layout  (Read 2650 times)

0 Members and 1 Guest are viewing this topic.

Offline sypl

  • Thread Starter
  • Posts: 116
modifier^2 layout
« on: Tue, 24 February 2015, 10:57:52 »
TL;DR: http://imgur.com/a/cIEpD

So while I was looking at the textblade videos I saw a functionality I'd never seen before: if you hold down two home row keys (D and F), a navigation/editing layer gets activated on the right half of the board. It seems a good idea and got me thinking. Their specific examples of how they use it, selecting words or lines at a time, doesn't particularly interest me as that type of thing can always be done with the right combination of modifiers and arrows.

But I got on to thinking, what if we put were to put the modifiers on the home row? And that's what I've been playing around with. I've been experimenting with it on my mac using Karabiner. Now, obviously you still need to type letters on the home row, so you would need a key to activate a modifiers layer on the home row. That's right, a modifier that enables modifiers! Hence, modifier^2.

The trick is to change the two command keys left and right of the spacebar into two new custom modifiers, let's call them lmod and rmod. I think I'll use images from here on out.

This is a default (mac) layout. Mac is nice because the spacebar is sizeable but not huuuuuuuge:
91816-0

And here's what activating the lmod layer gives you:
91818-1

Same on other side for shortcuts requiring letters from that side:
91820-2

Which means we can dump a whole bunch of modifiers. Note I consider caps lock a modifier, because I use it as a modifier! (reassigned as command)
91822-3

But, typing caps strings is tricky if you're having to change modifier left and right all the time, so let's put a shift back in. And as we have less modifiers we can use that caps for something else. I like it for esc for vim purposes.
91824-4

All the other keys removed on the bottom row I consider emacs pinky keys. You could of course use them for other purposes if so inclined. Basicallly, your keyboard just got a bunch of free (if awkward) keys!

And of course which modifier keys go under which home finger can be changed. I imagine emacs users would probably want to put control and option/meta under index and middle.

And now any combo of modifers is really easy to key, like OSX's ridiculous screenshot shortcut: command+control+shift+3

Offline sypl

  • Thread Starter
  • Posts: 116
Re: modifier^2 layout
« Reply #1 on: Tue, 24 February 2015, 10:58:14 »
Here's a Karabiner file if you're interested in having a go on your mac.

Code: [Select]
<?xml version="1.0"?>
<root>

    <!-- define new modifiers -->
    <modifierdef>MODIFIERMODIFIERLEFT</modifierdef>
    <modifierdef>MODIFIERMODIFIERRIGHT</modifierdef>

    <item>
        <name>modifier modifier</name>
        <identifier>private.modifier.modifier</identifier>

        <!-- reassign command keys to modifier modifiers -->
        <autogen>
            __KeyToKey__
            KeyCode::COMMAND_L,
            KeyCode::VK_MODIFIER_MODIFIERMODIFIERLEFT
        </autogen>
        <autogen>
            __KeyToKey__
            KeyCode::COMMAND_R,
            KeyCode::VK_MODIFIER_MODIFIERMODIFIERRIGHT
        </autogen>

        <!-- left hand modifiers -->
        <autogen>
            __KeyToKey__
            KeyCode::A, ModifierFlag::MODIFIERMODIFIERLEFT,
            KeyCode::OPTION_L, ModifierFlag::MODIFIERMODIFIERLEFT
        </autogen>
        <autogen>
            __KeyToKey__
            KeyCode::S, ModifierFlag::MODIFIERMODIFIERLEFT,
            KeyCode::CONTROL_L, ModifierFlag::MODIFIERMODIFIERLEFT
        </autogen>
        <autogen>
            __KeyToKey__
            KeyCode::D, ModifierFlag::MODIFIERMODIFIERLEFT,
            KeyCode::COMMAND_L, ModifierFlag::MODIFIERMODIFIERLEFT
        </autogen>
        <autogen>
            __KeyToKey__
            KeyCode::F, ModifierFlag::MODIFIERMODIFIERLEFT,
            KeyCode::SHIFT_L, ModifierFlag::MODIFIERMODIFIERLEFT
        </autogen>
        <autogen>
            __KeyToKey__
            KeyCode::G, ModifierFlag::MODIFIERMODIFIERLEFT,
            KeyCode::FN, ModifierFlag::MODIFIERMODIFIERLEFT
        </autogen>

        <!-- right hand modifiers-->
        <autogen>
            __KeyToKey__
            KeyCode::H, ModifierFlag::MODIFIERMODIFIERRIGHT,
            KeyCode::FN, ModifierFlag::MODIFIERMODIFIERRIGHT
        </autogen>
        <autogen>
            __KeyToKey__
            KeyCode::J, ModifierFlag::MODIFIERMODIFIERRIGHT,
            KeyCode::SHIFT_R, ModifierFlag::MODIFIERMODIFIERRIGHT
        </autogen>
        <autogen>
            __KeyToKey__
            KeyCode::K, ModifierFlag::MODIFIERMODIFIERRIGHT,
            KeyCode::COMMAND_R, ModifierFlag::MODIFIERMODIFIERRIGHT
        </autogen>
        <autogen>
            __KeyToKey__
            KeyCode::L, ModifierFlag::MODIFIERMODIFIERRIGHT,
            KeyCode::CONTROL_R, ModifierFlag::MODIFIERMODIFIERRIGHT
        </autogen>
        <autogen>
            __KeyToKey__
            KeyCode::SEMICOLON, ModifierFlag::MODIFIERMODIFIERRIGHT,
            KeyCode::OPTION_R, ModifierFlag::MODIFIERMODIFIERRIGHT
        </autogen>

    </item>
</root>

Offline sypl

  • Thread Starter
  • Posts: 116
Re: modifier^2 layout
« Reply #2 on: Tue, 24 February 2015, 11:00:44 »
This is also trivial to do with tmk and I've implemented on the little keyboard I made. Works beautifully!  :thumb:

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: modifier^2 layout
« Reply #3 on: Tue, 24 February 2015, 12:02:29 »
This looks a very strange idea but I'll give it a go on my JD40 where every key is precious :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline metalliqaz

  • * Maker
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: modifier^2 layout
« Reply #4 on: Thu, 26 February 2015, 09:46:07 »
I dont understand the value. You still use the option key, vut only to access the real mods.  So now mods require two keystrokes? Thats less efficient.

Offline sypl

  • Thread Starter
  • Posts: 116
Re: modifier^2 layout
« Reply #5 on: Thu, 26 February 2015, 11:47:46 »
Control and option are hard to reach, man. Either shift your thumb over a lot and twist wrist inwards, or curl little and ring fingers uncomfortably to that bottom row. And that is how people get emacs pinky. Home row keys are the most comfortable, and the keys left and right of your spacebar (presuming your space bar isn't too long) are most comfortable for your thumbs too. So, in combination, we have every single modifier combination possible. Again, think of something like command+shift+option+Q on a mac. That's crazy difficult to input. Using modifer^2 that's rmod+J+K+semicolon+Q. Seems a lot of keys, but it is more comfortable. Ain't nobody ever getting RSI doing that.

Yes, it does require more chording, and having tried it a few days it's not that that the real problem I'd say (muscle memory makes a lot of initially awkward feeling actions feel natural after a while), but the fact that I keep the shift there. You get used to that, but when you actually need to chord in something like option+shift+right to select a word of text, you forget because you're still trying to use the left shift. Compounded by my problem of still using caps as command, so I'm abusing that too and forgetting to use home row command keys. I should probably try going cold turkey with that.

One more thing: the modifier activates a layer, so you have to press it first, before the home row modifier, meaning you're really kind of doing a modifier>home row key>key sequence, which feels a little strange and different to anything else I've done before. We do the same thing with modifiers all the time - we have to hold shift before we hit our key, yes? Just this way you have to sequence two modifiers first.

As always when you're trying to compact layouts, there are tradeoffs. This method means I don't have any keys in hard to reach places, but at the cost of more mental load and a need more retraining muscle memory. I'm going to keep experimenting with this and report back if I have other findings. I encourage others to give it a shot too, particularly if you have a planck/atreus/smallfry.

Offline davkol

  •  Post Editing Timeout
  • Posts: 4994
Re: modifier^2 layout
« Reply #6 on: Thu, 26 February 2015, 12:26:20 »
cought, dual-role keys, cough

Offline sypl

  • Thread Starter
  • Posts: 116
Re: modifier^2 layout
« Reply #7 on: Thu, 26 February 2015, 12:50:32 »
No that's a different thing to what I'm doing. Dual role keys offer a tap and a hold functionality. If holding a home row key by itself made them modifiers then yes, they'd be classic dual role keys, but this requires another modifier to activate them. Or are you suggesting that I should just implement them as dual role keys? My fear is that I'd get a lot of accidental hits whilst trying to activate modifiers though, or accidentally activate them whilst typing fast. It's worth a try, but given my previous experience of dual roles, it likely won't work nicely.

BTW I use a dual command/esc in place of caps, which works just great. But, there's not an accidental press of that key just sends escape, which usually isn't tragic.

Offline sypl

  • Thread Starter
  • Posts: 116
Re: modifier^2 layout
« Reply #8 on: Thu, 26 February 2015, 12:59:23 »
Yeah, just tried plain dual role keys now in Karabiner and it was a bit of a disaster. Modifiers all over the shop. Unless I increase the timeout, making shortcuts... not so short, or type really slowly, that's a non-starter.

modifier^2 may be a little tricky to get the hang of, but I do have the predictability and control, which is what's needed when typing.

Offline davkol

  •  Post Editing Timeout
  • Posts: 4994
Re: modifier^2 layout
« Reply #9 on: Thu, 26 February 2015, 13:27:45 »
Yes, dual-role keys require some messing around with configuration. angelic_sedition was using something like that IIRC. I can't find his original thread at forum.colemak.com though. It should be buried somewhere in his config files at least.