Add LeaderMode.TIMEOUT (QMK default Leader mode)

This allows leader sequences to "time out" rather than requiring an
Enter keypress to end.

This also rolls back some unnecessary changes from #72 to the matrix
scanner for performance reasons.

In theory we can use this in the future for Tap Dance support (#40)

Resolves #1
Resolves #37
This commit is contained in:
Josh Klar
2018-10-19 01:49:37 -07:00
parent aa4b164067
commit 2d1290a12c
5 changed files with 77 additions and 50 deletions

View File

@@ -1,5 +1,5 @@
from kmk.boards.klarank import Firmware
from kmk.consts import UnicodeModes
from kmk.consts import LeaderMode, UnicodeModes
from kmk.keycodes import KC
from kmk.keycodes import generate_leader_dictionary_seq as glds
from kmk.macros.simple import send_string
@@ -45,6 +45,7 @@ emoticons = cuss({
WPM = send_string("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Bibendum arcu vitae elementum curabitur vitae nunc sed. Facilisis sed odio morbi quis.")
keyboard.leader_mode = LeaderMode.TIMEOUT
keyboard.leader_dictionary = {
glds('hello'): send_string('hello world from kmk macros'),
glds('wpm'): WPM,