From WikiChip
Editing mirc/identifiers/$keyval
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | {{mirc title|$keyval | + | {{mirc title|$keyval Identifier}}'''$keyval''' return the key code of the key being pressed inside an {{mIRC|on keydown}}/{{mIRC|on keyup}} event. |
− | |||
− | |||
+ | This identifier is usually used over {{mIRC|$keychar}} because $keychar returns the character itself: this is unreliable, you can't track some keys such as alt, control, non-printable character etc, they don't have a character representation. | ||
== Synopsis == | == Synopsis == | ||
<pre>$keyval</pre> | <pre>$keyval</pre> | ||
Line 16: | Line 15: | ||
ON *:KEYDOWN:@myWindow:*: { | ON *:KEYDOWN:@myWindow:*: { | ||
clear @myWindow | clear @myWindow | ||
− | drawtext @myWindow 1 3 3 Key value: $keyval | + | drawtext @myWindow 1 3 3 Key value: $iif($keyval,$v1,NA) |
+ | drawtext @myWindow 1 3 25 Key character: $iif($keychar,$v1,NA) | ||
drawtext @myWindow 1 3 47 @myWindow Repeating: $keyrpt | drawtext @myWindow 1 3 47 @myWindow Repeating: $keyrpt | ||
− | } | + | }</source> |
− | |||
− | |||
− | |||
− | </source> | ||
The following command can now be typed into any mIRC command prompt: | The following command can now be typed into any mIRC command prompt: | ||
Line 35: | Line 31: | ||
== Compatibility == | == Compatibility == | ||
{{mirc compatibility|5.5}} | {{mirc compatibility|5.5}} | ||
− | + | == See Also == | |
− | == See | + | * {{mirc|custom windows}} |
+ | * {{mirc|/drawtext}} | ||
* {{mirc|on keyup}} | * {{mirc|on keyup}} | ||
− | |||
* {{mirc|$keychar}} | * {{mirc|$keychar}} | ||
* {{mirc|$keyrpt}} | * {{mirc|$keyrpt}} | ||
− | |||
− | |||
− | |||
− |