Keyboard Triggers
| Published: | Comments: 4 | Filed under: Development
Just posting a reminder to myself to improve keyboard triggers to be better about modifier keys. Right now you have to specify (as one example) either :left_shift or :right_shift, but there's no way to say "I don't care which shift it is, as long as shift is being pressed. So I need to make it able to take :shift and have that match either the right or left versions. The same applies for ctrl, alt, etc. (I was writing the documentation for KeyPressTrigger, and I noticed I couldn't write an example of a trigger that matches Ctrl+Shift+A, without caring about left/right, without using two triggers nested in an AnyTrigger.)
I also want to improve magic hooks so that you can specify "Ctrl+Shift+A" and it will translate that into KeyPressTrigger.new( :a, [:ctrl, :shift] ). Because that would be really handy. But maybe that can wait until after 2.4? Dunno.
Update: Finished the docs for the event triggers, and pushed them to Github in the event_handler branch.
Comments