All Downloads are FREE. Search and download functionalities are using the official Maven repository.

simplex3d.engine.input.KeyCode.scala Maven / Gradle / Ivy

/*
 * Simplex3dEngine - Core Module
 * Copyright (C) 2011, Aleksey Nikiforov
 *
 * This file is part of Simplex3dEngine.
 *
 * Simplex3dEngine is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Simplex3dEngine is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see .
 */

package simplex3d.engine.input


object KeyCode {
  
  final val Num_Left = 0
  final val Num_Right = 1
  final val Num_Down = 2
  final val Num_Up = 3
  
  final val Num_0 = 4
  final val Num_1 = 5
  final val Num_2 = 6
  final val Num_3 = 7
  final val Num_4 = 8
  final val Num_5 = 9
  final val Num_6 = 10
  final val Num_7 = 11
  final val Num_8 = 12
  final val Num_9 = 13

  final val Num_Lock = 14
  final val Num_/ = 15
  final val Num_* = 16
  final val Num_- = 17
  final val Num_+ = 18
  final val Num_Enter = 19
  final val Num_Decimal = 20
  
  
  final val K_0 = 21
  final val K_1 = 22
  final val K_2 = 23
  final val K_3 = 24
  final val K_4 = 25
  final val K_5 = 26
  final val K_6 = 27
  final val K_7 = 28
  final val K_8 = 29
  final val K_9 = 30
  
  final val K_a = 31
  final val K_b = 32
  final val K_c = 33
  final val K_d = 34
  final val K_e = 35
  final val K_f = 36
  final val K_g = 37
  final val K_h = 38
  final val K_i = 39
  final val K_j = 40
  final val K_k = 41
  final val K_l = 42
  final val K_m = 43
  final val K_n = 44
  final val K_o = 45
  final val K_p = 46
  final val K_q = 47
  final val K_r = 48
  final val K_s = 49
  final val K_t = 50
  final val K_u = 51
  final val K_v = 52
  final val K_w = 53
  final val K_x = 54
  final val K_y = 55
  final val K_z = 56
  final val K_Space = 57

  final val K_BackQuote = 58
  final val K_- = 59
  final val K_Equals = 60
  final val K_OpenBracket = 61
  final val K_CloseBracket = 62
  final val K_\ = 63
  final val K_: = 64
  final val K_Quote = 65
  final val K_Comma = 66
  final val K_Period = 67
  final val K_/ = 68
  
  
  final val K_LeftAlt = 69
  final val K_RightAlt = 70
  final val K_LeftControl = 71
  final val K_RightControl = 72
  final val K_LeftShift = 73
  final val K_RightShift = 74
  final val K_Tab = 75
  final val K_CapsLock = 76
  
  final val K_Enter = 77
  final val K_Escape = 78
  
  final val K_BackSpace = 79
  final val K_Insert = 80
  final val K_Delete = 81
  final val K_Home = 82
  final val K_End = 83
  final val K_PageUp = 84
  final val K_PageDown = 85
  
  final val K_Pause = 86
  final val K_ScrollLock = 87
  final val K_Printscreen = 88
  
  final val K_ContextMenu = 89
  final val K_Meta = 90
  
  final val K_Left = 91
  final val K_Right = 92
  final val K_Down = 93
  final val K_Up = 94
  
  final val K_F1 = 95
  final val K_F2 = 96
  final val K_F3 = 97
  final val K_F4 = 98
  final val K_F5 = 99
  final val K_F6 = 100
  final val K_F7 = 101
  final val K_F8 = 102
  final val K_F9 = 103
  final val K_F10 = 104
  final val K_F11 = 105
  final val K_F12 = 106
  
  
  final val K_F13 = 107
  final val K_F14 = 108
  final val K_F15 = 109
  final val K_F16 = 110
  final val K_F17 = 111
  final val K_F18 = 112
  final val K_F19 = 113
  final val K_F20 = 114
  final val K_F21 = 115
  final val K_F22 = 116
  final val K_F23 = 117
  final val K_F24 = 118
  
  final val K_! = 119
  final val K_@ = 120
  final val K_# = 121
  final val K_$ = 122
  final val K_^ = 123
  final val K_& = 124
  final val K_* = 125
  final val K_LeftParentheses = 126
  final val K_RightParentheses = 127
  final val K_Underscore = 128
  final val K_+ = 129
  final val K_BraceLeft = 130
  final val K_BraceRight = 131
  final val K_Semicolor = 132
  final val K_Quotedbl = 133
  final val K_< = 134
  final val K_> = 135
  
  final val K_Copy = 136
  final val K_Cut = 137
  final val K_Paste = 138
    
  final val K_Accept = 139
  final val K_Again = 140
  final val K_AllCandidates = 141
  final val K_Alphanumeric = 142
  final val K_AltGraph = 143
  final val K_Begin = 144
  final val K_Cancel = 145
  final val K_Clear = 146
  final val K_CodeInput = 147
  final val K_Compose = 148
  final val K_Convert = 149
  final val K_DeadAbovedot = 150
  final val K_DeadAbovering = 151
  final val K_DeadAcute = 152
  final val K_DeadBreve = 153
  final val K_DeadCaron = 154
  final val K_DeadCedilla = 155
  final val K_DeadCircumflex = 156
  final val K_DeadDiaeresis = 157
  final val K_DeadDoubleacute = 158
  final val K_DeadGrave = 159
  final val K_DeadIota = 160
  final val K_DeadMacron = 161
  final val K_DeadOgonek = 162
  final val K_DeadSemivoicedSound = 163
  final val K_DeadTilde = 164
  final val K_DeadVoicedSound = 165
  final val K_EuroSign = 166
  final val K_Final = 167
  final val K_Find = 168
  final val K_FullWidth = 169
  final val K_HalfWidth = 170
  final val K_Help = 171
  final val K_Hiragana = 172
  final val K_InputMethodOnOff = 173
  final val K_InvertedExclamationMark = 174
  final val K_JapaneseHiragana = 175
  final val K_JapaneseKatakana = 176
  final val K_JapaneseRoman = 177
  final val K_Kana = 178
  final val K_KanaLock = 179
  final val K_Kanji = 180
  final val K_Katakana = 181
  final val K_Modechange = 182
  final val K_Nonconvert = 183
  final val K_PreviousCandidate = 184
  final val K_Props = 185
  final val K_RomanCharacters = 186
  final val K_Separator = 187
  final val K_Stop = 188
  final val K_Undo = 189
  
  
  final val K_Undefined = 190
  
  
  def toString(keyCode: Int) :String = {
    (keyCode: @scala.annotation.switch) match {
      case Num_Left => "Num_Left"
      case Num_Right => "Num_Right"
      case Num_Down => "Num_Down"
      case Num_Up => "Num_Up"
      case Num_0 => "Num_0"
      case Num_1 => "Num_1"
      case Num_2 => "Num_2"
      case Num_3 => "Num_3"
      case Num_4 => "Num_4"
      case Num_5 => "Num_5"
      case Num_6 => "Num_6"
      case Num_7 => "Num_7"
      case Num_8 => "Num_8"
      case Num_9 => "Num_9"
      case Num_Lock => "Num_Lock"
      case Num_/ => "Num_/"
      case Num_* => "Num_*"
      case Num_- => "Num_-"
      case Num_+ => "Num_+"
      case Num_Enter => "Num_Enter"
      case Num_Decimal => "Num_Decimal"
      case K_0 => "K_0"
      case K_1 => "K_1"
      case K_2 => "K_2"
      case K_3 => "K_3"
      case K_4 => "K_4"
      case K_5 => "K_5"
      case K_6 => "K_6"
      case K_7 => "K_7"
      case K_8 => "K_8"
      case K_9 => "K_9"
      case K_a => "K_a"
      case K_b => "K_b"
      case K_c => "K_c"
      case K_d => "K_d"
      case K_e => "K_e"
      case K_f => "K_f"
      case K_g => "K_g"
      case K_h => "K_h"
      case K_i => "K_i"
      case K_j => "K_j"
      case K_k => "K_k"
      case K_l => "K_l"
      case K_m => "K_m"
      case K_n => "K_n"
      case K_o => "K_o"
      case K_p => "K_p"
      case K_q => "K_q"
      case K_r => "K_r"
      case K_s => "K_s"
      case K_t => "K_t"
      case K_u => "K_u"
      case K_v => "K_v"
      case K_w => "K_w"
      case K_x => "K_x"
      case K_y => "K_y"
      case K_z => "K_z"
      case K_Space => "K_Space"
      case K_BackQuote => "K_BackQuote"
      case K_- => "K_-"
      case K_Equals => "K_Equals"
      case K_OpenBracket => "K_OpenBracket"
      case K_CloseBracket => "K_CloseBracket"
      case K_\ => "K_\\"
      case K_: => "K_:"
      case K_Quote => "K_Quote"
      case K_Comma => "K_Comma"
      case K_Period => "K_Period"
      case K_/ => "K_/"
      case K_LeftAlt => "K_LeftAlt"
      case K_RightAlt => "K_RightAlt"
      case K_LeftControl => "K_LeftControl"
      case K_RightControl => "K_RightControl"
      case K_LeftShift => "K_LeftShift"
      case K_RightShift => "K_RightShift"
      case K_Tab => "K_Tab"
      case K_CapsLock => "K_CapsLock"
      case K_Enter => "K_Enter"
      case K_Escape => "K_Escape"
      case K_BackSpace => "K_BackSpace"
      case K_Insert => "K_Insert"
      case K_Delete => "K_Delete"
      case K_Home => "K_Home"
      case K_End => "K_End"
      case K_PageUp => "K_PageUp"
      case K_PageDown => "K_PageDown"
      case K_Pause => "K_Pause"
      case K_ScrollLock => "K_ScrollLock"
      case K_Printscreen => "K_Printscreen"
      case K_ContextMenu => "K_ContextMenu"
      case K_Meta => "K_Meta"
      case K_Left => "K_Left"
      case K_Right => "K_Right"
      case K_Down => "K_Down"
      case K_Up => "K_Up"
      case K_F1 => "K_F1"
      case K_F2 => "K_F2"
      case K_F3 => "K_F3"
      case K_F4 => "K_F4"
      case K_F5 => "K_F5"
      case K_F6 => "K_F6"
      case K_F7 => "K_F7"
      case K_F8 => "K_F8"
      case K_F9 => "K_F9"
      case K_F10 => "K_F10"
      case K_F11 => "K_F11"
      case K_F12 => "K_F12"
      case K_F13 => "K_F13"
      case K_F14 => "K_F14"
      case K_F15 => "K_F15"
      case K_F16 => "K_F16"
      case K_F17 => "K_F17"
      case K_F18 => "K_F18"
      case K_F19 => "K_F19"
      case K_F20 => "K_F20"
      case K_F21 => "K_F21"
      case K_F22 => "K_F22"
      case K_F23 => "K_F23"
      case K_F24 => "K_F24"
      case K_! => "K_!"
      case K_@ => "K_@"
      case K_# => "K_#"
      case K_$ => "K_$"
      case K_^ => "K_^"
      case K_& => "K_&"
      case K_* => "K_*"
      case K_LeftParentheses => "K_LeftParentheses"
      case K_RightParentheses => "K_RightParentheses"
      case K_Underscore => "K_Underscore"
      case K_+ => "K_+"
      case K_BraceLeft => "K_BraceLeft"
      case K_BraceRight => "K_BraceRight"
      case K_Semicolor => "K_Semicolor"
      case K_Quotedbl => "K_Quotedbl"
      case K_< => "K_<"
      case K_> => "K_>"
      case K_Copy => "K_Copy"
      case K_Cut => "K_Cut"
      case K_Paste => "K_Paste"
      case K_Accept => "K_Accept"
      case K_Again => "K_Again"
      case K_AllCandidates => "K_AllCandidates"
      case K_Alphanumeric => "K_Alphanumeric"
      case K_AltGraph => "K_AltGraph"
      case K_Begin => "K_Begin"
      case K_Cancel => "K_Cancel"
      case K_Clear => "K_Clear"
      case K_CodeInput => "K_CodeInput"
      case K_Compose => "K_Compose"
      case K_Convert => "K_Convert"
      case K_DeadAbovedot => "K_DeadAbovedot"
      case K_DeadAbovering => "K_DeadAbovering"
      case K_DeadAcute => "K_DeadAcute"
      case K_DeadBreve => "K_DeadBreve"
      case K_DeadCaron => "K_DeadCaron"
      case K_DeadCedilla => "K_DeadCedilla"
      case K_DeadCircumflex => "K_DeadCircumflex"
      case K_DeadDiaeresis => "K_DeadDiaeresis"
      case K_DeadDoubleacute => "K_DeadDoubleacute"
      case K_DeadGrave => "K_DeadGrave"
      case K_DeadIota => "K_DeadIota"
      case K_DeadMacron => "K_DeadMacron"
      case K_DeadOgonek => "K_DeadOgonek"
      case K_DeadSemivoicedSound => "K_DeadSemivoicedSound"
      case K_DeadTilde => "K_DeadTilde"
      case K_DeadVoicedSound => "K_DeadVoicedSound"
      case K_EuroSign => "K_EuroSign"
      case K_Final => "K_Final"
      case K_Find => "K_Find"
      case K_FullWidth => "K_FullWidth"
      case K_HalfWidth => "K_HalfWidth"
      case K_Help => "K_Help"
      case K_Hiragana => "K_Hiragana"
      case K_InputMethodOnOff => "K_InputMethodOnOff"
      case K_InvertedExclamationMark => "K_InvertedExclamationMark"
      case K_JapaneseHiragana => "K_JapaneseHiragana"
      case K_JapaneseKatakana => "K_JapaneseKatakana"
      case K_JapaneseRoman => "K_JapaneseRoman"
      case K_Kana => "K_Kana"
      case K_KanaLock => "K_KanaLock"
      case K_Kanji => "K_Kanji"
      case K_Katakana => "K_Katakana"
      case K_Modechange => "K_Modechange"
      case K_Nonconvert => "K_Nonconvert"
      case K_PreviousCandidate => "K_PreviousCandidate"
      case K_Props => "K_Props"
      case K_RomanCharacters => "K_RomanCharacters"
      case K_Separator => "K_Separator"
      case K_Stop => "K_Stop"
      case K_Undo => "K_Undo"
      case K_Undefined => "K_Undefined"
      case _ => "UndefinedEnum_" + keyCode.toString
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy