Post Reply 
Can I access keys by their names
08-19-2016, 03:36 PM
Post: #10
RE: Can I access keys by their names
(07-26-2016 08:39 PM)Tim Wessman Wrote:  
(07-26-2016 08:26 PM)StephenG1CMZ Wrote:  When you said 4 is not equal to a string, I thought K ESC was a string.
But MSGBOX(STRING(K_Esc,))
Doesn't work - which could have been useful if you wanted to say "Press Escape to Escape" but refer to the key name consistently:
"Press "+K_Esc+" to Escape".

What I meant is that if you are doing something like 4 == "K_Esc", it is always false because the string "K_Esc" is not equal to the numerical value 4. There is no mapping exposed between the names used in the user key definitions, and the numerical values.

We've thought about several possibilities, but never have found one that we really liked yet.

How about making the key names constant values (like the value of Pi)?

DISPLAY K_Esc

would display 4

Tom L

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Can I access keys by their names - toml_12953 - 08-19-2016 03:36 PM



User(s) browsing this thread: 1 Guest(s)