Key shortcuts not working properly on Windows

Issue #10 new
- -
created an issue

set some BPs in code key_callback, here are my results:

  • A/W/S/D = walk -> working
  • L = light perspective -> working
  • +/- = lense -> triggered but no visible effect
  • ctrl+q = quit -> working
  • / = dialog -> not triggered
  • \ = bringUpIbexDisplay -> not triggered
  • B = barrel distort -> triggered but no visible effect
  • G = ground -> working
  • R = Reset position -> working

problem with / and \ seems to be that the key_callback is called multiple times for SHIFT, and "7" = / and ALT-SUPER+ ß = \ (german layout) and the code for the combined key is never sent.

for testing, I set following, and its working. m like menu and c like center. / and \ would probably work if you check for GLFW_MOD_SHIFT && 7-key and GLFW_MOD_SUPER && ß-key, however imho / and \ are unintuitive and different keyboard layouts complicate things even more:


case GLFW_KEY_M:

if(!down) {

showDialog = !showDialog;

ibex->renderer->window.reset();

}

break;

case GLFW_KEY_C:

if(!down) {

bringUpIbexDisplay = true;

}

break;

Comments (8)

  1. Hesham Wahba repo owner

    You make some good points about keyboard layouts. The code itself right now is really bad in terms of organization and keyboard handling. Moving to GLFW for all platforms will help consolidate that code then I can look to allow keyboard mapping.

    The latest branch should fix displaying of menus on your keyboard I hope, but if not I'll find some different mappings.

    The other flags like barrel distort and the lens IPD adjustment may go away soon. The IPD specifically isn't needed as the new code depends on the calibration using the Oculus SDK and the user profile (though I should probably add a way to choose profiles).

  2. - - reporter

    as of eb928fa :

    • GLFW_KEY_SEMICOLON not working, same as with GLFW_KEY_SLASH and GLFW_KEY_BACKSLASH. keycodes for shift+key or alt+key arrive in sequence but never the combined keycode
  3. - - reporter

    Will this be resolved somewhen in the near future? Its impossible to invoke the menu or center screen with non-mac keyboards.

  4. Log in to comment