Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-10-05 13:02:11



Reply to topic  [ 4 posts ] 
'Space' cannot be used for keybinds or gestures due to a bug 
Author Message

Joined: 2024-09-07 16:52:39
Posts: 1
Reply with quote
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.


2024-09-07 17:05:11
Profile

Joined: 2009-03-17 18:42:51
Posts: 5795
Reply with quote
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...


2024-09-07 17:16:23
Profile WWW

Joined: 2009-03-17 18:42:51
Posts: 5795
Reply with quote
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.


2024-09-08 09:35:27
Profile WWW

Joined: 2009-03-17 18:42:51
Posts: 5795
Reply with quote
Linux space key translation implemented in today's release (v1.32.2.13).


2024-09-14 08:59:21
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.