Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporary layer keys #44

Open
jasonmhite opened this issue Mar 18, 2021 · 1 comment
Open

Temporary layer keys #44

jasonmhite opened this issue Mar 18, 2021 · 1 comment

Comments

@jasonmhite
Copy link

Would it be possible to add something that behaves like GOTO_PROFILE but it returns to the original layer after the next (subsequent) key press? This would let us emulate having something like QMK layers so that we could quickly switch between different groups of shortcuts for complicated apps that have a lot of shortcuts.

I'm thinking something like my IDE with a ton of complicated hotkeys. I would have a primary profile with the most common shortcuts, and on that maybe the bottom row of keys are mapped to swap to different profiles with more specialized commands. I could press a swap key and it would shift to the specialized profile, then I press the command I want and it would return to the original layer. This would be a very powerful addition, I think.

I know you're busy and thank you for all the work thus far!

@jose1711
Copy link
Contributor

You may achieve similar feature with the current beta firmware, note however that in fact you will not be switching to a profile but instead emulating it inside duckyscript. Upon execution DP will show a legend for upper row, then it will start listening on a subsequent keypress. As soon as a user input is detected it executes the action.

VAR $k = 0
OLED_CLEAR
OLED_CURSOR 0 0
OLED_PRINT foo    bar    baz
OLED_UPDATE
WHILE $k == 0
    $k = $_READKEY
    DELAY 50
END_WHILE

IF $k == 1 THEN
  STRINGLN foo
ELSE IF $k == 2 THEN
  STRINGLN bar
ELSE IF $k == 3 THEN
  STRINGLN baz
END_IF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants