Skip to content

How to implement "Adaptive Keys"? #481

Answered by jtroo
veyxov asked this question in Q&A
Discussion options

You must be logged in to vote

You could actually try out your possible solution today! Though it is definitely convoluted and hard to discover how to do it.

Here's a working sample that makes 0 adaptive where if it is pressed quickly enough after 9, it becomes an exclamation mark (with the US locale).

(defsrc 9 0)
(deflayer base
  (multi
    9
    (on-press-fakekey fk-adaptive1 press)
    (macro 200 (on-press-fakekey fk-adaptive1 release)))
  0
)
(deflayer adaptive1 9 S-1)
(deffakekeys
  fk-adaptive1 (layer-while-held adaptive1)
)

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jtroo
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #476 on July 07, 2023 22:19.