User Tools

Site Tools


en:keypressed

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:keypressed [2016/05/12 20:24]
admin
en:keypressed [2020/02/28 10:46] (current)
Line 3: Line 3:
 ==== Format ==== ==== Format ====
  
-**keypressed** ( //expr// )+**keypressed** ( [[expressions|expression]] )
  
-return //boolean_value// or //integer_value//+return [[booleanexpressions|boolean_expression]] or [[integerexpressions|integer_expression]]
  
 ==== Description ==== ==== Description ====
Line 11: Line 11:
 The KeyPressed function returns a true or false value if a key is currently pressed, or returns the number of keys that are currently being pressed.  Unlike the [[key|key]] function that clears the keyboard buffer, the KeyPressed function does not.  This allows for the creation of much more responsive games and other uses of the keyboard. The KeyPressed function returns a true or false value if a key is currently pressed, or returns the number of keys that are currently being pressed.  Unlike the [[key|key]] function that clears the keyboard buffer, the KeyPressed function does not.  This allows for the creation of much more responsive games and other uses of the keyboard.
  
 +See the [[Key|key]] function for a list of common key codes or see [[http://qt-project.org/doc/qt-4.8/qt.html#Key-enum|here]] for a complete list codes.
  
 ==== Example ==== ==== Example ====
en/keypressed.1463106276.txt.gz ยท Last modified: 2020/02/28 10:46 (external edit)