kareltucek / firmware

This is fork of UHK's firmware featuring extended macro engine.
Other
82 stars 9 forks source link

Add or-condition in ifGeature and ifShortcut #79

Closed soraxas closed 2 years ago

soraxas commented 2 years ago

Allow or-condition in ifShortcut and ifGesture. Usage: I have the following in the macro for the mouse key to make it multi-purpose:

ifShortcut noConsume orGate 008 015 016 017 014 021 29 final holdLayer mouse
// 8, 15, 16, 17 are I J K L
// 14, 21 are Y, H (mouse vert scroll keys)
// 29 is right space (e.g. typical mouse click)

// other functionality for the mouse key (e.g. treat as leftControl for any other key-combo)

holding mouse key and pressing ijkl will morph it to mouse layer (previously it is also feasible, but require duplicated line for each condition)

kareltucek commented 2 years ago

Not entirelly sure, but sounds fair enough.

Also, there is another approach (which is indeed missing some building blocks and would therefore require more thinking and work to make it work) - to wait till another key is pressed and then test with ifKeyDefined whether it is defined.

I guess you have already figured that out, but (contrary to what current readme says) multiline scripts are now supported...