Hi everyone, I'm a newbie developer in Compose Mul...
# feed
v
Hi everyone, I'm a newbie developer in Compose Multiplatform. I recently developed a small DSL to simplify creating keyboard hotkeys in my project. Currently it supports the following possible command variations.
Copy code
// Chords
Key.A press { }
Key.A + Ctrl press { }
Key.A + Ctrl + Alt press { }
Key.A + Ctrl + Alt + Shift press { }
Key.A + Hyper press { }              // ctrl + alt + shift + meta + A
Key.A + Key.B press { }                 // A and B simultaneously
Key.A + Key.B with Ctrl press { }
Alt + Ctrl { }

// Sequences
Key.A andThen Key.B press { }
Key.A + Ctrl andThen Key.B press { }
Key.A + Ctrl andThen Key.B + Shift press { }
Key.A andThen Key.B andThen Key.C press { }

// KeyUp 
Key.A up { }
Key.A + Ctrl up { }
Key.A andThen Key.B up { }
https://github.com/yours-valentiine/HyperKey
😲 4
🤩 8
🚀 17
t
This dsl looks so nice!