DreymaR / BigBagKbdTrixPKL

"DreymaR's Big Bag of Keyboard Tricks" for Windows with EPKL
Other
328 stars 32 forks source link

Make Extend Modifiers Functional *After* Pressing Extend Key #13

Closed tmbutcher closed 3 years ago

tmbutcher commented 3 years ago

Hey, love this this program, thanks so much for creating and maintaining it.

I was wondering if it might be possible to have modifier keys affect the extend layer if they are pressed after the extend key has been pressed.

For example, right now pressing RShift and then Extend → Extend layer 2. But pressing Extend and then RShift → Extend layer 1. At least for me, I would like for the second series of actions to also get me to Extend layer 2.

I know enough about AHK to know that this might be pretty difficult, but I thought I might go ahead and ask just in case. Thank you!

tmbutcher commented 3 years ago

Alternatively—for me at least it would have the same result—it would be cool if there were a way to make the other mod keys fire through the extend key. So, for example, if Ext+V normally sends Ctrl+V, pressing Extend then shift then V would send Shift+Ctrl+V.

DreymaR commented 3 years ago

I see what you're getting at. But I prefer the shift modifier to work with the Extend layer you've chosen instead. So modifiers before Extend choose which layer it is, modifiers after Extend are modifiers.

Modifiers should work with Extend, are you saying they don't now? If so, that's a bug that I'm unaware of. If I press Ext then hold a Shift and a Ctrl and the Extend arrows (UNEI), words and paragraphs are selected as they should. But that doesn't (and probably shouldn't) work with tapping Sticky modifiers.

Incidentally, this opens for some interesting combos. If I tap RShift (with Sticky RShift) and then Ext-tap, I get the Kaomoji dead key layer. If I then tap a letter after a little while, I get the base version of its kaomoji but if I press the letter really fast after Ext-tap I get the other version!

tmbutcher commented 3 years ago

Oh interesting! This might be related to my personal idiosyncratic case. Basically, what I've done is to make the Extend 1 layer send Ctrl+[QWERTY letter]. This is because I always do shortcuts by looking at the keyboard itself, so I'd like for the modifier shortcuts to reflect the letter that's printed on the keycap, rather than whatever the Colemak key for that spot is. (So, for example, hitting Ext+R [Colemak layout] would send Ctrl+S—recorded in the Extend ini as "α^s".)

And that all works as I'd like it to. But if I hold Ext and then hold Shift and then hit R [Colemak], it sends Ctrl+S rather than Ctrl+Shift+S. If the modifiers work through Extend normally, then I would guess that this is some consequence of hardcoding the hotkey to send the AHK syntax.

I've gotten around this by just mapping the Ext2 layer to send the appropriate ctrl+shift combo ("α^+[letter]"), but I tend to hit the shift key before the Ext key—thus the feature request!

Anyway, thanks for taking the time to respond, I appreciate it!

DreymaR commented 3 years ago

Okay, that's because you've mapped your sends slightly wrong. You want to send Blind with Ctrl, so that's not α^<key> but β^<key>. Try that!

On another note: Since you send single key strokes, I'd recommend not wasting an Ext-hold layer on them but instead use tap-Ext. You could have your layer in the dead key file as, say, [dk_Ext_Ctrl] and let @ex0 = Ext_Ctrl at the start of the Deadkey file. Tap-dances are much easier on your hands than chords, and perfect for single-key output. However, with that, you may have to map for the shifted keys separately – see the other DKs for examples.

tmbutcher commented 3 years ago

Oh hey, that did the trick! I ended up using the β^<key> terminology in the State2 column in the layout file, and now it's working as I'd like for it to! I had actually tried this earlier, but using the α character, and ran into the same problem as above.

I'll also see about switching over to using the @ex0 DK layer as you suggest. I had also tried that previously, and decided against it because I couldn't find a way to make it into a "hard" layer (that is, layout independent). I still switch back to QWERTY at times, so that was messing up my use-case. But now that I've got the ctrl shortcuts working the way they "usually" do, maybe I'll just set it for Colemak and it can be a nice additional incentive to use Colemak even more.

Thank you so much for the help, I'm very grateful.