org.cosplay.CPKeyboardKey
See theCPKeyboardKey companion object
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.
Attributes
- See also:
CPKeyboardEvent.key
- Companion:
- object
- Source:
- CPKeyboardKey.scala
- Graph
- Supertypes
- trait Enumtrait Productclass HashMap[String, AnyRef]trait Serializabletrait 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 Clearabletrait Cloneable[HashMap[String, AnyRef]]trait Cloneabletrait Iterable[(String, AnyRef)]class AbstractMap[String, AnyRef]trait Map[String, AnyRef]trait Equalstrait MapFactoryDefaults[String, AnyRef, HashMap, Iterable]trait MapOps[String, AnyRef, HashMap, HashMap[String, AnyRef]]trait PartialFunction[String, AnyRef]trait String => AnyRefclass 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 Objecttrait Matchableclass Any