Main
|
Resume
|
Showreel
|
Blog
|
Script
|
Contact
connexion
go to footer
expand all
|
collapse all
languages
class
All
JScript|XSI
Python|XSI
JScript|WEB
Python|Maya
All
Memo
learning
DDD
php
tool
keyboard tooltips
rig
KeyboardState()
- All - felixlecha
// Log the switch/modifier keyboard pressed // keyboard interaction : GetKeyboardState function KeyboardState() { var rtn = GetKeyboardState(); var iPressKey = rtn(1); var str = ""; if ( 1 & iPressKey ) { str = "Shift " } if ( 2 & iPressKey ) { str += "Ctrl " } if ( 4 & iPressKey ) { str += "Alt " } if ( str != "" ) { LogMessage( str + "pressed", siInfo ); } else { LogMessage( "No modifier key pressed.", siInfo ); } LogMessage("Press Key Value : "+ iPressKey); }