Cool VL Viewer forum
http://sldev.free.fr/forum/

'Space' cannot be used for keybinds or gestures due to a bug
http://sldev.free.fr/forum/viewtopic.php?f=10&t=2571
Page 1 of 1

Author:  MagicCraftMaster [ 2024-09-07 17:05:11 ]
Post subject:  'Space' cannot be used for keybinds or gestures due to a bug

For a while when first using the viewer I found that one of my gestures didn't work. Recently I messed with the keys.ini file to try and use space as a button but it did nothing. Trying a different key worked.
I downloaded the source code and after tracing the input code I found that on non-Windows systems the space key isn't translated correctly and thus the key is dropped from input.
The fix for this is as simple as inserting the following in these files:
Code:
# indra/llwindow/llkeyboardsdl.cpp @ line 109
mTranslateKeyMap[SDLK_SPACE] = ' ';
Code:
# indra/llwindow/llkeyboardmacosx.cpp @ line 140
mTranslateKeyMap[0x31] = ' ';

As an important side note: I don't use Mac so I googled the key code which may be wrong.

Author:  Henri Beauchamp [ 2024-09-07 17:16:23 ]
Post subject:  Re: 'Space' cannot be used for keybinds or gestures due to a

Space is not supposed to be a key binding all by itself in the first place... So, not technically a bug.

In fact, it is highly discouraged to use any "printable" character key as a key binding, simply because such a key will be intercepted on sight by any focused chat or IM input line... and since the main chat input line is always focused by default while showing, this will invariably result in your printable character to be grabbed by it.

This is how the v1 UI works and, as a role-player (and not at all a gesture user), this happens to also be exactly how I want it to work.

I will consider including your contribution, but I must first review it and make sure it won't break something else...

Author:  Henri Beauchamp [ 2024-09-08 09:35:27 ]
Post subject:  Re: 'Space' cannot be used for keybinds or gestures due to a

OK, after a more thorough look at it, Linux indeed "lacked" a space key translation feature, but macOS already got it (line 92 of llkeyboardmacosx.cpp), so nothing needs changed for the latter.

I am currently running a Linux viewer with the added space translation, and baring any discovered quirk (the keyboard management is extremely finicky in both Linux and the viewer code), your contribution/fix will be part of next release.

Author:  Henri Beauchamp [ 2024-09-14 08:59:21 ]
Post subject:  Re: 'Space' cannot be used for keybinds or gestures due to a

Linux space key translation implemented in today's release (v1.32.2.13).

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/