Enhanced keyboard shortcuts
From Ben's Writing
It occurs to me that we should have the ability to encode single keyboard short-cuts that tell the computer to ignore the modifier. I know that a user can express the same statement using two rules: Ctrl+PgUp and simply PgUp. But since this is likely only ever done by expert users, having a more complex syntax seems reasonable, not to mention the duplicity of the rules can be reduced. If we allowed rules of the form {Ctrl}-PgUp to mean optionally press Ctrl while concurrently depressing PgUp. This type of shortcut may show up in the case of a media centre, where only a subset of the keyboard is used. Controls sequences like the following up show up in some of my configuration files:
- <left>StepBack</left>
- <left mod="ctrl">SmallStepBack</left>
- <right>StepForward</right>
- <right mod="ctrl">StepForward</right>
Where < tagk > refers to which keyboard button k has been pressed, attribute modj refers to a modifier key, like ctrl and shift. The ones of interest are the tagright with and without modifiers. I could have been re-written like so:
<right mod="-ctrl">StepForward</right>
Meaning that the state of the control key should be ignored, for savings of one keyboard shortcut statement.