-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix weak modifier clear in action macro
- Loading branch information
Showing
1 changed file
with
2 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e852582
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not solve using Shift with the following macro:
F20 is my Compose key, I use this to create upper- and lower case letters specific for my language (æøå).
With my patch it works fine:
e852582
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is good idea to remove modifier state automatically like that. People may want to combine their macro with modifier keys. Let's say you define a macro as 'Alt+Tab' for 'Cycle windows' it is natural to expect Shift + the macro works as 'Cycle windows reverse'.
Instead macro commands should be extended so that you can tweak modifier state in your macro definition.
Like, SM(), for store modifier state, RM() for restore modifier state and CM() for clear modifier? Current Macro implementation is clearly poor and should be redesigned from scratch probably.
https://github.com/tmk/tmk_keyboard/blob/master/doc/keymap.md#231-macro-commands
With this extension you will be able to write macro like this:
I'll file this as an issue, thanks.
e852582
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed that in #116.
e852582
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would do nicely. The main reason why I needed this in my macro is because the uppercase version of the symbol would also add the shift state to the
/
symbol, which would en up being?
.I would suggest that SM/RM/CM should be able to take a value (or multiple) for storing/restoring/clearing specific and/or multiple modifiers, the default behavior being all modifiers.