diff --git a/scripts/globals/layout_config.gd b/scripts/globals/layout_config.gd index 0e57036..8528227 100644 --- a/scripts/globals/layout_config.gd +++ b/scripts/globals/layout_config.gd @@ -17,18 +17,18 @@ var layouts: Dictionary[String, AbstractLayout] = { # LayoutISO.name_static(): LayoutISO.new(), # LayoutABNT.name_static(): LayoutABNT.new(), # LayoutJIS.name_static(): LayoutJIS.new(), - # LayoutJD40.name_static(): LayoutJD40.new(), - # LayoutPlanck.name_static(): LayoutPlanck.new(), # "ansi-104.json": LayoutKLE.new("res://scripts/layouts/kle/ansi-104.json"), # "ansi-104-big-enter.json": # LayoutKLE.new("res://scripts/layouts/kle/ansi-104-big-enter.json"), # "iso-105.json": LayoutKLE.new("res://scripts/layouts/kle/iso-105.json"), # "keycool-84.json": LayoutKLE.new("res://scripts/layouts/kle/keycool-84.json"), + "jd40.json": LayoutKLE.new("res://scripts/layouts/kle/jd40.json"), + "planck.json": LayoutKLE.new("res://scripts/layouts/kle/planck.json"), # "kinesis-advantage.json": # LayoutKLE.new("res://scripts/layouts/kle/kinesis-advantage.json"), # "atreus.json": LayoutKLE.new("res://scripts/layouts/kle/atreus.json"), - "apple-wireless-keyboard.json": - LayoutKLE.new("res://scripts/layouts/kle/apple-wireless-keyboard.json"), + # "apple-wireless-keyboard.json": + # LayoutKLE.new("res://scripts/layouts/kle/apple-wireless-keyboard.json"), # LayoutTest.name_static(): LayoutTest.new(), } diff --git a/scripts/layouts/kle/jd40.json b/scripts/layouts/kle/jd40.json new file mode 100644 index 0000000..a32fbcd --- /dev/null +++ b/scripts/layouts/kle/jd40.json @@ -0,0 +1,79 @@ +[ + { + "name": "JD40" + }, + [ + "Esc", + "Q", + "W", + "E", + "R", + "T", + "Y", + "U", + "I", + "O", + "P", + "Back
Space" + ], + [ + { + "w": 1.25 + }, + "Tab", + "A", + "S", + "D", + "F", + "G", + "H", + "J", + "K", + "L", + { + "w": 1.75 + }, + "Enter" + ], + [ + { + "w": 1.75 + }, + "Shift", + "Z", + "X", + "C", + "V", + "B", + "N", + "M", + "<\n.", + { + "w": 1.25 + }, + "Shift", + "Fn" + ], + [ + { + "w": 1.25 + }, + "Hyper", + "Super", + "Meta", + { + "a": 7, + "w": 6.25 + }, + "", + { + "a": 4, + "w": 1.25 + }, + "Meta", + { + "w": 1.25 + }, + "Super" + ] +] \ No newline at end of file diff --git a/scripts/layouts/kle/planck.json b/scripts/layouts/kle/planck.json new file mode 100644 index 0000000..6f8edff --- /dev/null +++ b/scripts/layouts/kle/planck.json @@ -0,0 +1,66 @@ +[ + { + "name": "Planck" + }, + [ + { + "a": 7 + }, + "Tab", + "Q", + "W", + "E", + "R", + "T", + "Y", + "U", + "I", + "O", + "P", + "Back Space" + ], + [ + "Esc", + "A", + "S", + "D", + "F", + "G", + "H", + "J", + "K", + "L", + ";", + "'" + ], + [ + "Shift", + "Z", + "X", + "C", + "V", + "B", + "N", + "M", + ",", + ".", + "/", + "Return" + ], + [ + "", + "Ctrl", + "Alt", + "Super", + "⇓", + { + "w": 2 + }, + "", + "⇑", + "←", + "↓", + "↑", + "→" + ] +] \ No newline at end of file diff --git a/scripts/layouts/layout_jd40.gd b/scripts/layouts/layout_jd40.gd deleted file mode 100644 index 7c3a03d..0000000 --- a/scripts/layouts/layout_jd40.gd +++ /dev/null @@ -1,55 +0,0 @@ -class_name LayoutJD40 extends AbstractLayout - - -static func name_static() -> String: - return "JD40" - - -func rows() -> Array[Array]: - return [ - ( - [{KeyProps.KEY: KEY_ESCAPE}] - + CommonLayout.letters_1() - + [{KeyProps.KEY: KEY_BACKSPACE}] - ), - ( - [{KeyProps.KEY: KEY_TAB, KeyProps.W: 1.5}] - + CommonLayout.letters_2() - + [{KeyProps.KEY: KEY_ENTER, KeyProps.W: 1.5}] - ), - ( - [ - { - KeyProps.KEY: KEY_SHIFT, - KeyProps.W: 1.75, - KeyProps.LOC: KEY_LOCATION_LEFT - } - ] - + CommonLayout.letters_3() - + [ - {KeyProps.KEY: KEY_COMMA}, - { - KeyProps.KEY: KEY_SHIFT, - KeyProps.W: 1.25, - KeyProps.LOC: KEY_LOCATION_RIGHT - }, - {KeyProps.KEY: KEY_PERIOD}, - ] - ), - [ - {KeyProps.KEY: KEY_CTRL, KeyProps.W: 1.5, KeyProps.LOC: KEY_LOCATION_LEFT}, - {KeyProps.KEY: KEY_SPECIAL, KeyProps.LOC: KEY_LOCATION_LEFT}, - {KeyProps.KEY: KEY_ALT, KeyProps.LOC: KEY_LOCATION_LEFT}, - {KeyProps.KEY: KEY_SPACE, KeyProps.W: 6}, - { - KeyProps.KEY: KEY_SPECIAL, - KeyProps.W: 1.25, - KeyProps.LOC: KEY_LOCATION_RIGHT - }, - { - KeyProps.KEY: KEY_CTRL, - KeyProps.W: 1.25, - KeyProps.LOC: KEY_LOCATION_RIGHT - }, - ] - ] diff --git a/scripts/layouts/layout_jd40.gd.uid b/scripts/layouts/layout_jd40.gd.uid deleted file mode 100644 index 2238c67..0000000 --- a/scripts/layouts/layout_jd40.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://i3bve82hdaop diff --git a/scripts/layouts/layout_kle.gd b/scripts/layouts/layout_kle.gd index 0679d52..c9d2b02 100644 --- a/scripts/layouts/layout_kle.gd +++ b/scripts/layouts/layout_kle.gd @@ -13,6 +13,7 @@ const LABEL_TO_KEYCODE_MAP: Dictionary[String, Key] = { ".": KEY_PERIOD, "/": KEY_SLASH, "#": KEY_NUMBERSIGN, + "Return": KEY_ENTER, "Esc": KEY_ESCAPE, "esc": KEY_ESCAPE, "Bksp": KEY_BACKSPACE, @@ -27,6 +28,7 @@ const LABEL_TO_KEYCODE_MAP: Dictionary[String, Key] = { "super": KEY_META, "⌘": KEY_META, "command": KEY_META, + "Meta": KEY_META, "AltGr": KEY_ALT, "PrtSc": KEY_PRINT, "PrintScr SysReq": KEY_PRINT, @@ -43,12 +45,16 @@ const LABEL_TO_KEYCODE_MAP: Dictionary[String, Key] = { "Fn": KEY_SPECIAL, "↑": KEY_UP, "⇧": KEY_UP, + "↑": KEY_UP, "←": KEY_LEFT, "⇦": KEY_LEFT, + "←": KEY_LEFT, "↓": KEY_DOWN, "⇩": KEY_DOWN, + "↓": KEY_DOWN, "→": KEY_RIGHT, "⇨": KEY_RIGHT, + "→": KEY_RIGHT, } const LABEL_TO_NUMPAD_KEYCODE_MAP: Dictionary[String, Key] = { diff --git a/scripts/layouts/layout_planck.gd b/scripts/layouts/layout_planck.gd deleted file mode 100644 index b4eaa00..0000000 --- a/scripts/layouts/layout_planck.gd +++ /dev/null @@ -1,34 +0,0 @@ -class_name LayoutPlanck extends AbstractLayout - - -static func name_static() -> String: - return "Planck" - - -func rows() -> Array[Array]: - return [ - ( - [{KeyProps.KEY: KEY_TAB}] - + CommonLayout.letters_1() - + [{KeyProps.KEY: KEY_BACKSPACE}] - ), - [{KeyProps.KEY: KEY_ESCAPE}] + CommonLayout.letters_row_2(), - ( - [{KeyProps.KEY: KEY_SHIFT, KeyProps.LOC: KEY_LOCATION_LEFT}] - + CommonLayout.letters_row_3() - + [{KeyProps.KEY: KEY_ENTER}] - ), - [ - {KeyProps.KEY: KEY_SPECIAL}, - {KeyProps.KEY: KEY_CTRL, KeyProps.LOC: KEY_LOCATION_LEFT}, - {KeyProps.KEY: KEY_ALT, KeyProps.LOC: KEY_LOCATION_LEFT}, - {KeyProps.KEY: KEY_META, KeyProps.LOC: KEY_LOCATION_LEFT}, - {KeyProps.KEY: KEY_SPECIAL, KeyProps.LOC: KEY_LOCATION_LEFT}, - {KeyProps.KEY: KEY_SPACE, KeyProps.W: 2}, - {KeyProps.KEY: KEY_SPECIAL, KeyProps.LOC: KEY_LOCATION_RIGHT}, - {KeyProps.KEY: KEY_LEFT}, - {KeyProps.KEY: KEY_DOWN}, - {KeyProps.KEY: KEY_UP}, - {KeyProps.KEY: KEY_RIGHT}, - ] - ] diff --git a/scripts/layouts/layout_planck.gd.uid b/scripts/layouts/layout_planck.gd.uid deleted file mode 100644 index a6519cd..0000000 --- a/scripts/layouts/layout_planck.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://dqjuvbt87uah0