Gesture bound to Shift+= doesn't trigger #203

Closed
opened 2026-09-30 06:08:59 +00:00 by sky_line · 0 comments
Owner

A gesture with the trigger key Shift + = does nothing when the key is pressed.

Likely cause (code read, not yet verified in-world)

The SDL keyboard translation gives the = key a different KEY code from the one gestures store:

  • indra/llwindow/llkeyboardsdl.cpp:91: mTranslateKeyMap[SDLK_EQUALS] = KEY_EQUALS; where KEY_EQUALS = 0x91 (indra_constants.h:96).
  • llkeyboardsdl.cpp:112: mTranslateKeyMap[SDLK_PLUS] = '=';
  • LL's Windows and macOS keyboards map the main-row =/+ key to '=' (61). Gesture assets store the trigger key as '=', since they're made and shared across viewers.
  • LLGestureMgr::triggerGesture(key, mask) (llgesturemgr.cpp:734) compares gesture->mKey == key exactly. Under SDL, pressing = arrives as KEY_EQUALS (0x91), so an = gesture never matches, with or without Shift.
  • Affects Linux and Windows: both use the SDL window. Any other key binding that expects '=' is probably affected too, e.g. control|alt|shift|= in menu_viewer.xml (the particle render-type toggle).

To check

  1. Log key/mask in LLViewerWindow::handleKey (the triggerGesture call, llviewerwindow.cpp ~3433) while pressing Shift+=, and compare with the gesture's mKey/mMask.
  2. Likely fix: map SDLK_EQUALS to '=' like the other viewers. Check what KEY_EQUALS is meant for (numpad =? SDLK_KP_EQUALS) and whether anything relies on the current mapping: key bindings, LLKeyConflict, the keybinding preferences UI.
  3. Audit the rest of mTranslateKeyMap against LL's Windows/mac tables for other punctuation keys that differ: `- , . / ; ' [ ] \ ``. Gestures and shortcuts on those keys would fail the same way.
  4. Shift handling: confirm SDL gives the unshifted keycode (SDLK_EQUALS) plus MASK_SHIFT, not SDLK_PLUS, for Shift+= on the tester's layout. Non-US layouts may differ.

Test

Gestures on =, Shift+=, Ctrl+=, -, [, ], ; and / all fire. Ctrl+Alt+Shift+= toggles particles.

A gesture with the trigger key **Shift + =** does nothing when the key is pressed. ## Likely cause (code read, not yet verified in-world) The SDL keyboard translation gives the `=` key a different KEY code from the one gestures store: - `indra/llwindow/llkeyboardsdl.cpp:91`: `mTranslateKeyMap[SDLK_EQUALS] = KEY_EQUALS;` where `KEY_EQUALS = 0x91` (`indra_constants.h:96`). - `llkeyboardsdl.cpp:112`: `mTranslateKeyMap[SDLK_PLUS] = '=';` - LL's Windows and macOS keyboards map the main-row `=`/`+` key to `'='` (61). Gesture assets store the trigger key as `'='`, since they're made and shared across viewers. - `LLGestureMgr::triggerGesture(key, mask)` (`llgesturemgr.cpp:734`) compares `gesture->mKey == key` exactly. Under SDL, pressing `=` arrives as `KEY_EQUALS` (0x91), so an `=` gesture never matches, with or without Shift. - **Affects Linux and Windows:** both use the SDL window. Any other key binding that expects `'='` is probably affected too, e.g. `control|alt|shift|=` in menu_viewer.xml (the particle render-type toggle). ## To check 1. Log `key`/`mask` in `LLViewerWindow::handleKey` (the `triggerGesture` call, llviewerwindow.cpp ~3433) while pressing Shift+=, and compare with the gesture's `mKey`/`mMask`. 2. **Likely fix:** map `SDLK_EQUALS` to `'='` like the other viewers. Check what `KEY_EQUALS` is meant for (numpad `=`? `SDLK_KP_EQUALS`) and whether anything relies on the current mapping: key bindings, `LLKeyConflict`, the keybinding preferences UI. 3. **Audit the rest of `mTranslateKeyMap`** against LL's Windows/mac tables for other punctuation keys that differ: `- , . / ; ' [ ] \ \``. Gestures and shortcuts on those keys would fail the same way. 4. **Shift handling:** confirm SDL gives the unshifted keycode (`SDLK_EQUALS`) plus `MASK_SHIFT`, not `SDLK_PLUS`, for Shift+= on the tester's layout. Non-US layouts may differ. ## Test Gestures on `=`, Shift+=, Ctrl+=, `-`, `[`, `]`, `;` and `/` all fire. `Ctrl+Alt+Shift+=` toggles particles.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#203
No description provided.