CPKeyboardKey

enum CPKeyboardKey(val id: String, val isPrintable: Boolean, val ch: Char, val rawCodes: Seq[Char]*) extends HashMap[String, AnyRef]

Enumeration of all supported keyboard keys.

Remapped Keys

The following keystrokes are automatically re-mapped:

  • CTRL+h is mapped to CPKeyboardKey.KEY_BACKSPACE.
  • CTRL+i is mapped to CPKeyboardKey.KEY_TAB.
  • CTRL+m is mapped to CPKeyboardKey.KEY_ENTER.

NOTE: CTRL+h, CTRL+i and CTRL+m will not be detected as-is, and you should use their conversions instead. Note that even-though this enumeration provides constants for CTRL+h, CTRL+i and CTRL+m they will never be returned to the scene objects since they would always be automatically remapped. This is the limitation of the ANSI terminals, i.e. CTRL+m generated the same ANSI code as Enter key press.

Reserved Keys

There are three reserved key strokes that are used by the game engine itself and therefore NOT available to the game. These keystrokes are intercepted before frame update and not propagated to the scene object context:

  • 'CTRL+Q' - toggles in-game FPS overlay
  • 'CTRL+L' - opens GUI-based loc viewer & debugger
  • 'F12' - saves current frame screenshot as *.xp image to the current working folder.
See also:

CPKeyboardEvent.key

Companion:
object
Source:
CPKeyboardKey.scala
trait Enum
trait Product
class HashMap[String, AnyRef]
trait Serializable
trait StrictOptimizedMapOps[String, AnyRef, HashMap, HashMap[String, AnyRef]]
trait StrictOptimizedIterableOps[(String, AnyRef), Iterable, HashMap[String, AnyRef]]
class AbstractMap[String, AnyRef]
trait Map[String, AnyRef]
trait MapOps[String, AnyRef, HashMap, HashMap[String, AnyRef]]
trait Shrinkable[String]
trait Builder[(String, AnyRef), HashMap[String, AnyRef]]
trait Growable[(String, AnyRef)]
trait Clearable
trait Cloneable[HashMap[String, AnyRef]]
trait Cloneable
trait Iterable[(String, AnyRef)]
class AbstractMap[String, AnyRef]
trait Map[String, AnyRef]
trait Equals
trait MapFactoryDefaults[String, AnyRef, HashMap, Iterable]
trait MapOps[String, AnyRef, HashMap, HashMap[String, AnyRef]]
trait PartialFunction[String, AnyRef]
trait String => AnyRef
class AbstractIterable[(String, AnyRef)]
trait Iterable[(String, AnyRef)]
trait IterableFactoryDefaults[(String, AnyRef), Iterable]
trait IterableOps[(String, AnyRef), Iterable, HashMap[String, AnyRef]]
trait IterableOnceOps[(String, AnyRef), Iterable, HashMap[String, AnyRef]]
trait IterableOnce[(String, AnyRef)]
class Object
trait Matchable
class Any

Type members

Enum entries

case KEY_AT extends CPKeyboardKey

'@' key press.

'@' key press.

Source:
CPKeyboardKey.scala

'\\' key press.

'\\' key press.

Source:
CPKeyboardKey.scala

'^' key press.

'^' key press.

Source:
CPKeyboardKey.scala
case KEY_EXCL extends CPKeyboardKey

'!' key press.

'!' key press.

Source:
CPKeyboardKey.scala
case KEY_GT extends CPKeyboardKey

'>' key press.

'>' key press.

Source:
CPKeyboardKey.scala

'[' key press.

'[' key press.

Source:
CPKeyboardKey.scala

'{' key press.

'{' key press.

Source:
CPKeyboardKey.scala
case KEY_LPAR extends CPKeyboardKey

'(' key press.

'(' key press.

Source:
CPKeyboardKey.scala
case KEY_LT extends CPKeyboardKey

'<' key press.

'<' key press.

Source:
CPKeyboardKey.scala

'#' key press.

'#' key press.

Source:
CPKeyboardKey.scala

'?' key press.

'?' key press.

Source:
CPKeyboardKey.scala

'"' key press.

'"' key press.

Source:
CPKeyboardKey.scala

']' key press.

']' key press.

Source:
CPKeyboardKey.scala

'}' key press.

'}' key press.

Source:
CPKeyboardKey.scala
case KEY_RPAR extends CPKeyboardKey

')' key press.

')' key press.

Source:
CPKeyboardKey.scala

'/' key press.

'/' key press.

Source:
CPKeyboardKey.scala

'~' key press.

'~' key press.

Source:
CPKeyboardKey.scala
case KEY_VERT extends CPKeyboardKey

'|' key press.

'|' key press.

Source:
CPKeyboardKey.scala