Changed the bind system this morning, the changes will go live with 0.70, probably before Monday.
Code: Select all
- Revamped bind system. System now accepts any combination of modifier keys plus a non-modifier
key, rather than any number of keys and ignoring modifiers. Modifier keys may also be treated
as non-modifiers, for example by using only "shift" or "ctrl+shift". Binds now also allow
separate commands for press and release, defaulting to release. Example:
bind -press wireframe f8 wireframe on
bind -release wireframe f8 wireframe off
When F8 is pressed in this example, wireframe turns on. When F8 is released, wireframe turns off.
The revamped system also considers the pressed modifier keys when processing binds, and they must
match. This means that more binds could be added to the above example:
bind wireframetoggle alt+f8 wireframe toggle
When Alt+f8 is pressed and then released in this example, wireframe will be toggled. The F8 bind
will not be used, because the modifier keys do not match (no modifiers vs Alt). Prior to this
revamp, if Alt+F8 and F8 were both bound, both would have been used.
On the [ issue, you can use it in a bind by surrounding it with quotes, like so:
bind test "[" echo hi
The parser currently treats [ as requiring a matching ], and everything from [ to the next ] is considered to be a part of a single parameter. The reason is actually just from having to parse ${}, so I'll see about changing this behavior to only happen when it sees ${ rather than [, which would be more desirable.
Thanks for the reports