possible bug in IS...

Discussion of Inner Space

Moderators: Lavish Software Team, Moderators

Post Reply
don'tdoit
Non-Subscriber
Posts: 29
Joined: Thu Jul 08, 2004 7:43 pm

possible bug in IS...

Post by don'tdoit » Sat Feb 05, 2005 12:13 am

One bind works:

Code: Select all

bind test1 shift+delete run test1
With that, if I hit delete nothing happens, as expected. When I hit Shift+delete, it runs test1, as expected.

Ignore the first bind as if I never had it. This bind works too:

Code: Select all

bind test2 delete run test2
When I hit delete it runs test2, as expected. When I hit shift+delete (or even alt+delete or ctrl+delete), it runs test2, which is not expected or desired as it means I can not have both binds at the same time (since both test1 and test2 would run if i hit the shift+delete, etc combo).

same thing happens if you substitute delete for any other key. also, it seems that binding to the [ key doesn't work.

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Sat Feb 05, 2005 6:18 am

I'll check on the [ key.

I've been meaning to change the bind system. I'll make sure this doesn't happen.. in the meantime, you can obviously use two different combinations like shift+delete and alt+delete. I'll try to have the bind system changes in the next release, this weekend or early next week

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Sat Feb 05, 2005 7:43 am

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

don'tdoit
Non-Subscriber
Posts: 29
Joined: Thu Jul 08, 2004 7:43 pm

Post by don'tdoit » Sat Feb 05, 2005 10:24 am

of course, that's what we're testing this for right? heheh.

the [ key bothered me because the ] key worked, but I understand why.

Post Reply