Ok, not an expert on this so it may or may not work - really basing this 
off my reading of the source code and a very very quick test.

I think to create KeyChords of arbitrary length, you need to your 
intermediary bindings to also be KeyChords i.e.

# Don't forget to add the KeyChord to the imports

KeyChord([mod], "z", [    # Start chord by pressing Mod+z
            KeyChord([], "x", [  # Continue chord with "x"
                Key([], "c", lazy.spawn(myterm),)  # Finally trigger 
whatever command you want
                ]) ])

KeyChords also have a "mode" option which lets you stay in the same mode to 
trigger multiple sub-bindings.

Lastly, the keychords just get added to your keys variable.
On Wednesday, 4 November 2020 at 05:38:58 UTC [email protected] wrote:

> How would I make keychords of arbitrary length?
>
> Eg let's copy Spacemac's window movement keybindings.
>
> I'll bind 'Command' mode to 'Hyper' or something obscure.
>
> Then the keychord for moving left in the layout would be "Space" "w" "l".
>
> and so on....
>
> Additionally, how should I define keychords in the config?  Do they go in 
> a list variable called 'keychords'?
>
> eg
>
> keychords = [ # Should this be called 'keychords'?
>   KeyChord([], hyper, [Key([], "Space" # how to define 'w' and 'l' here?
> ...
> ]
>
>
> Can someone kindly fill in my knowledge-gaps?
>

-- 
You received this message because you are subscribed to the Google Groups 
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qtile-dev/d0a0f0a8-0f3f-4d62-b7e6-ed59e7b9a990n%40googlegroups.com.

Reply via email to