Quantcast
Channel: The Plover Blog
Viewing all articles
Browse latest Browse all 522

Metakey Kludge

$
0
0
I'll let Ted from the Google Group describe his ingenious new solution for Plover's lack of arbitrarily stackable metakeys. (You can explicitly define a metakey+key combination in the dictionary, but you can't map a stroke to, say, Control and then be able to simulate holding it down while choosing another key in realtime to be activated along with it.)

Hello PloverSteno!

Intro:

I've seen complaints in the past about the lack of a "sticky modifier" function in Plover. The idea being that you could define a stroke for Shift, one for Control, then using these strokes write something like "Control/Shift/p" or any other stroke.

Well, today I'd like to announce my workaround!

It's a Python script that takes a list of modifiers (Control, Super, Alt, Shift, by default) and a list of hotkeys (alphanumeric, enter, backspace, delete, and arrow keys, by default) and then generates every *possible* combination in order to give you one-off hotkeys. The output is a dictionary that you load into Plover and you're ready to go.

Of course, I recommend a single stroke for something common like "Ctrl-v" for paste, but sometimes you just need a one-off "Control-alt-shift-Left arrow" and that's what this script aims to let you do.

As a little bonus, there's a definition in there that has 100 strokes in order to increase Plover's buffer length.

Usage:

If you don't like my default strokes, you can go into the script and change the "modifiers" or "hotkeys" lists in the main method. But these are the defaults, as per the script:

- Alt/Option: TLA* (THRA*)
- Command: KM* (KPL*)
- Control: KL* (KHR*)
- Shift: SF* (STP*)

Otherwise all the letters, numbers, return, and backspace are all Plover default.

Of note, if you want to just "press" the combination without a key, for example in Windows you can use "Ctrl+Shift" to change keyboard layouts, use the blank stroke:

- "SP*S"

I also had to add an entry for the delete key, which is just:

- DLAO*ET (TKHRAO*ET)

Download:

Download it from the GitHub repo. "modifiers.json" is the dictionary with all my defaults, "makeShortcuts.py" is the Python script to run to make the dictionary.

Please, feedback is welcome. Also think of this as a workaround, not a permanent solution to the problem.


Many thanks to Ted for this! I have a feeling it'll come in extremely handy.

Viewing all articles
Browse latest Browse all 522

Trending Articles