123 lines
2.7 KiB
GDScript
123 lines
2.7 KiB
GDScript
class_name CommonKeys
|
|
|
|
|
|
static func big_enter_iso() -> Dictionary:
|
|
return {
|
|
KeyProps.KEY: KEY_ENTER,
|
|
KeyProps.W: 1.25,
|
|
KeyProps.H: 2,
|
|
KeyProps.X: 0.25,
|
|
KeyProps.W2: 1.5,
|
|
KeyProps.X2: -0.25,
|
|
}
|
|
|
|
|
|
static func big_enter_ansi() -> Dictionary:
|
|
return {
|
|
KeyProps.KEY: KEY_ENTER,
|
|
KeyProps.W: 1.5,
|
|
KeyProps.H: 2,
|
|
KeyProps.W2: 2.25,
|
|
KeyProps.Y2: 1,
|
|
KeyProps.X2: -0.75,
|
|
}
|
|
|
|
|
|
static func numbers() -> Array:
|
|
return [
|
|
{KeyProps.KEY: KEY_1},
|
|
{KeyProps.KEY: KEY_2},
|
|
{KeyProps.KEY: KEY_3},
|
|
{KeyProps.KEY: KEY_4},
|
|
{KeyProps.KEY: KEY_5},
|
|
{KeyProps.KEY: KEY_6},
|
|
{KeyProps.KEY: KEY_7},
|
|
{KeyProps.KEY: KEY_8},
|
|
{KeyProps.KEY: KEY_9},
|
|
{KeyProps.KEY: KEY_0},
|
|
]
|
|
|
|
|
|
static func number_row() -> Array:
|
|
return (
|
|
[{KeyProps.KEY: KEY_QUOTELEFT}]
|
|
+ numbers()
|
|
+ [{KeyProps.KEY: KEY_MINUS}, {KeyProps.KEY: KEY_EQUAL}]
|
|
)
|
|
|
|
|
|
static func letters_1() -> Array:
|
|
return [
|
|
{KeyProps.KEY: KEY_Q},
|
|
{KeyProps.KEY: KEY_W},
|
|
{KeyProps.KEY: KEY_E},
|
|
{KeyProps.KEY: KEY_R},
|
|
{KeyProps.KEY: KEY_T},
|
|
{KeyProps.KEY: KEY_Y},
|
|
{KeyProps.KEY: KEY_U},
|
|
{KeyProps.KEY: KEY_I},
|
|
{KeyProps.KEY: KEY_O},
|
|
{KeyProps.KEY: KEY_P},
|
|
]
|
|
|
|
|
|
static func letters_row_1() -> Array:
|
|
return (
|
|
letters_1()
|
|
+ [{KeyProps.KEY: KEY_BRACKETLEFT}, {KeyProps.KEY: KEY_BRACKETRIGHT}]
|
|
)
|
|
|
|
|
|
static func letters_2() -> Array:
|
|
return [
|
|
{KeyProps.KEY: KEY_A},
|
|
{KeyProps.KEY: KEY_S},
|
|
{KeyProps.KEY: KEY_D},
|
|
{KeyProps.KEY: KEY_F, KeyProps.NUB: true},
|
|
{KeyProps.KEY: KEY_G},
|
|
{KeyProps.KEY: KEY_H},
|
|
{KeyProps.KEY: KEY_J, KeyProps.NUB: true},
|
|
{KeyProps.KEY: KEY_K},
|
|
{KeyProps.KEY: KEY_L},
|
|
]
|
|
|
|
|
|
static func letters_row_2() -> Array:
|
|
return letters_2() + [{KeyProps.KEY: KEY_SEMICOLON}, {KeyProps.KEY: KEY_APOSTROPHE}]
|
|
|
|
|
|
static func letters_3() -> Array:
|
|
return [
|
|
{KeyProps.KEY: KEY_Z},
|
|
{KeyProps.KEY: KEY_X},
|
|
{KeyProps.KEY: KEY_C},
|
|
{KeyProps.KEY: KEY_V},
|
|
{KeyProps.KEY: KEY_B},
|
|
{KeyProps.KEY: KEY_N},
|
|
{KeyProps.KEY: KEY_M},
|
|
]
|
|
|
|
|
|
static func letters_row_3() -> Array:
|
|
return (
|
|
letters_3()
|
|
+ [
|
|
{KeyProps.KEY: KEY_COMMA},
|
|
{KeyProps.KEY: KEY_PERIOD},
|
|
{KeyProps.KEY: KEY_SLASH}
|
|
]
|
|
)
|
|
|
|
|
|
static func bottom_row() -> Array:
|
|
return [
|
|
{KeyProps.KEY: KEY_CTRL, KeyProps.W: 1.25, KeyProps.LOC: KEY_LOCATION_LEFT},
|
|
{KeyProps.KEY: KEY_META, KeyProps.W: 1.25, KeyProps.LOC: KEY_LOCATION_LEFT},
|
|
{KeyProps.KEY: KEY_ALT, KeyProps.W: 1.25, KeyProps.LOC: KEY_LOCATION_LEFT},
|
|
{KeyProps.KEY: KEY_SPACE, KeyProps.W: 6.25},
|
|
{KeyProps.KEY: KEY_ALT, KeyProps.W: 1.25, KeyProps.LOC: KEY_LOCATION_RIGHT},
|
|
{KeyProps.KEY: KEY_META, KeyProps.W: 1.25, KeyProps.LOC: KEY_LOCATION_RIGHT},
|
|
{KeyProps.KEY: KEY_MENU, KeyProps.W: 1.25},
|
|
{KeyProps.KEY: KEY_CTRL, KeyProps.W: 1.25, KeyProps.LOC: KEY_LOCATION_RIGHT},
|
|
]
|