Testing new native alias "KEYPRESS"

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6835 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Bukz
2012-06-12 11:18:13 +00:00
parent c5d17a6b8f
commit e57a13a248
+5
View File
@@ -551,6 +551,11 @@ void keypress(int code, bool isdown, int cooked, SDLMod mod)
{
if(haskey) execbind(*haskey, isdown);
}
if(isdown && identexists("KEYPRESS")) // TODO: Remove this if its misued. e.x: /KEYPRESS = [ echo You pressed key code: $arg1 ] // Output: You pressed key code: 32 (if you press the spacebar)
{
defformatstring(kpi)("KEYPRESS %d", code);
execute(kpi);
}
}
char *getcurcommand()