About Store Forum Documentation Contact



Post Reply 
KBSC shift
Author Message
RedcrowProd Offline
Member

Post: #1
KBSC shift
hey, so my problem is fairly simple;

kbsc
Str asText()C; // get text describing the shortcut

but any shift ( 16 of index ), get "" description on this, same with any modifier(alt/ctlr)

is that intended ? is there a way with index to get what key it is, without having to set it manualy ? like if(index==16)button.setText("shift");

thanks smile

ps: i was just messing around with the keybindings option, and maybe a "tuto exemple" might be a good add on this wink
02-06-2016 01:44 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: KBSC shift
Hi,

You need to use a KB_* enum for the index,
There is no public shift enum for index==16.

The key names are stored in Kb._key_name which is a private member.
You can modify it when having Source License.

To obtain the name in read-only way, you can use the Kb.keyName method.
02-06-2016 04:48 PM
Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Member

Post: #3
RE: KBSC shift
oh ok got it ^^ thanks

index16 is what i get from pressing shift with Kb.k();
as well as index 160/161 (L_SHIFT/R_SHIFT)

but enum is only for Lshift/Rshift even if the index is still there from the shift, that's what i was asking pfft (friday night fatigue)

but i'll use Lshift/Rshift for now =p
(This post was last modified: 02-06-2016 06:25 PM by RedcrowProd.)
02-06-2016 06:25 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: KBSC shift
The index 16 it's how Windows works, however this index may not work on other OS, that's why it's not officially supported in the engine.
02-07-2016 01:59 AM
Find all posts by this user Quote this message in a reply
Post Reply