Skip to content

Commit

Permalink
Some bugfixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
angryc committed Nov 10, 2022
1 parent 50f830e commit c31146d
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 28 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
kotlin.code.style=official
kotlin.version=1.7.10
compose.version=1.2.0-beta02
kotlin.version=1.7.20
compose.version=1.2.0
10 changes: 8 additions & 2 deletions src/main/kotlin/common/Keyboards.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@ data class keyboard (

val backgroundColor = Color(0xFF0000AA)

val ModelM_ansi = keyboard(3, "IBM Model M Ansi Layout",listOf(listOf(Key("ESC", "Esc", 1.0, 1.0, Color.LightGray), Key("", "", 1.0, 1.0, backgroundColor), Key("F1", "F1", 1.0, 1.0, Color.White), Key("F2", "F2", 1.0, 1.0, Color.White), Key("F3", "F3", 1.0, 1.0, Color.White), Key("F4", "F4", 1.0, 1.0, Color.White), Key("", "", 0.5, 1.0, backgroundColor), Key("F5", "F5", 1.0, 1.0, Color.LightGray), Key("F6", "F6", 1.0, 1.0, Color.LightGray), Key("F7", "F7", 1.0, 1.0, Color.LightGray), Key("F8", "F8", 1.0, 1.0, Color.LightGray), Key("", "", 0.5, 1.0, backgroundColor), Key("F9", "F9", 1.0, 1.0, Color.White), Key("F10", "F10", 1.0, 1.0, Color.White), Key("F11", "F11", 1.0, 1.0, Color.White), Key("F12", "F12", 1.0, 1.0, Color.White), Key("", "", 0.25, 1.0, backgroundColor), Key("PRINTSCREEN", "Print Screen", 1.0, 1.0, Color.LightGray), Key("SCROLL_LOCK", "Scroll Lock", 1.0, 1.0, Color.LightGray), Key("PAUSE", "Pause", 1.0, 1.0, Color.LightGray)),
val ModelM_ansi = keyboard(4, "IBM Model M Ansi Layout",listOf(listOf(Key("ESC", "Esc", 1.0, 1.0, Color.LightGray), Key("", "", 1.0, 1.0, backgroundColor), Key("F1", "F1", 1.0, 1.0, Color.White), Key("F2", "F2", 1.0, 1.0, Color.White), Key("F3", "F3", 1.0, 1.0, Color.White), Key("F4", "F4", 1.0, 1.0, Color.White), Key("", "", 0.5, 1.0, backgroundColor), Key("F5", "F5", 1.0, 1.0, Color.LightGray), Key("F6", "F6", 1.0, 1.0, Color.LightGray), Key("F7", "F7", 1.0, 1.0, Color.LightGray), Key("F8", "F8", 1.0, 1.0, Color.LightGray), Key("", "", 0.5, 1.0, backgroundColor), Key("F9", "F9", 1.0, 1.0, Color.White), Key("F10", "F10", 1.0, 1.0, Color.White), Key("F11", "F11", 1.0, 1.0, Color.White), Key("F12", "F12", 1.0, 1.0, Color.White), Key("", "", 0.25, 1.0, backgroundColor), Key("PRINTSCREEN", "Print Screen", 1.0, 1.0, Color.LightGray), Key("SCROLL_LOCK", "Scroll Lock", 1.0, 1.0, Color.LightGray), Key("PAUSE", "Pause", 1.0, 1.0, Color.LightGray)),
listOf(Key("", "", 20.0, 1.0, backgroundColor)),
listOf( Key("BACK_QUOTE", "`", 1.0, 1.0, Color.White), Key("1", "1", 1.0, 1.0, Color.White), Key("2", "2", 1.0, 1.0, Color.White), Key("3", "3", 1.0, 1.0, Color.White), Key("4", "4", 1.0, 1.0, Color.White), Key("5", "5", 1.0, 1.0, Color.White), Key("6", "6", 1.0, 1.0, Color.White), Key("7", "7", 1.0, 1.0, Color.White), Key("8", "8", 1.0, 1.0, Color.White), Key("9", "9", 1.0, 1.0, Color.White), Key("0", "0", 1.0, 1.0, Color.White), Key("MINUS", "-", 1.0, 1.0, Color.White), Key("EQUAL", "=", 1.0, 1.0, Color.White), Key("BACKSPACE", "<- Backspace", 2.0, 1.0, Color.LightGray), Key("", "", 0.25, 1.0, backgroundColor), Key("INSERT", "Insert", 1.0, 1.0, Color.LightGray), Key("HOME", "Home", 1.0, 1.0, Color.LightGray), Key("PAGE_UP", "Page Up", 1.0, 1.0, Color.LightGray), Key("", "", 0.25, 1.0, backgroundColor), Key("NUM_LOCK", "Num Lock", 1.0, 1.0, Color.LightGray), Key("PAD_SLASH", "/", 1.0, 1.0, Color.LightGray), Key("PAD_ASTERIX", "*", 1.0, 1.0, Color.LightGray), Key("PAD_MINUS", "-", 1.0, 1.0, Color.LightGray)),
listOf(Key("TAB", "-->|", 1.5, 1.0, Color.LightGray), Key("Q", "Q", 1.0, 1.0, Color.White), Key("W", "W", 1.0, 1.0, Color.White), Key("E", "E", 1.0, 1.0, Color.White), Key("R", "R", 1.0, 1.0, Color.White), Key("T", "T", 1.0, 1.0, Color.White), Key("Y", "Y", 1.0, 1.0, Color.White), Key("U", "U", 1.0, 1.0, Color.White), Key("I", "I", 1.0, 1.0, Color.White), Key("O", "O", 1.0, 1.0, Color.White), Key("P", "P", 1.0, 1.0, Color.White), Key("LEFT_BRACE", "[", 1.0, 1.0, Color.White), Key("RIGHT_BRACE", "]", 1.0, 1.0, Color.White), Key("BACKSLASH", "\\", 1.5, 1.0, Color.White), Key("", "", 0.25, 1.0, backgroundColor), Key("DELETE", "Delete", 1.0, 1.0, Color.LightGray), Key("END", "End", 1.0, 1.0, Color.LightGray), Key("PAGE_DOWN", "Page Down", 1.0, 1.0, Color.LightGray), Key("", "", 0.25, 1.0, backgroundColor), Key("PAD_7", "7", 1.0, 1.0, Color.White), Key("PAD_8", "8", 1.0, 1.0, Color.White), Key("PAD_9", "9", 1.0, 1.0, Color.White), Key("PAD_PLUS", "+", 1.0, 2.0, Color.LightGray)),
listOf(Key("CAPS_LOCK", "Capslock", 1.75, 1.0, Color.LightGray), Key("A", "A", 1.0, 1.0, Color.White), Key("S", "S", 1.0, 1.0, Color.White), Key("D", "D", 1.0, 1.0, Color.White), Key("F", "F", 1.0, 1.0, Color.White), Key("G", "G", 1.0, 1.0, Color.White), Key("H", "H", 1.0, 1.0, Color.White), Key("J", "J", 1.0, 1.0, Color.White), Key("K", "K", 1.0, 1.0, Color.White), Key("L", "L", 1.0, 1.0, Color.White), Key("SEMICOLON", ";", 1.0, 1.0, Color.White), Key("QUOTE", "'", 1.0, 1.0, Color.White), Key("ENTER", "Enter", 2.25, 1.0, Color.LightGray), Key("", "", 3.5, 0.0, Color.LightGray), Key("PAD_4", "4", 1.0, 1.0, Color.White), Key("PAD_5", "5", 1.0, 1.0, Color.White), Key("PAD_6", "6", 1.0, 1.0, Color.White), Key("", " ", 0.0, 1.0, Color.Transparent)),
listOf(Key("LSHIFT", "Shift", 2.25, 1.0, Color.LightGray), Key("Z", "Z", 1.0, 1.0, Color.White), Key("X", "X", 1.0, 1.0, Color.White), Key("C", "C", 1.0, 1.0, Color.White), Key("V", "V", 1.0, 1.0, Color.White), Key("B", "B", 1.0, 1.0, Color.White), Key("N", "N", 1.0, 1.0, Color.White), Key("M", "M", 1.0, 1.0, Color.White), Key("COMMA", ",", 1.0, 1.0, Color.White), Key("PERIOD", ".", 1.0, 1.0, Color.White), Key("SLASH", "/", 1.0, 1.0, Color.White), Key("RSHIFT", "Shift", 2.75, 1.0, Color.LightGray), Key("", "", 1.25, 1.0, backgroundColor), Key("UP", "^", 1.0, 1.0, Color.LightGray), Key("", "", 1.25, 1.0, backgroundColor), Key("PAD_1", "1", 1.0, 1.0, Color.White), Key("PAD_2", "2", 1.0, 1.0, Color.White), Key("PAD_3", "3", 1.0, 1.0, Color.White), Key("PAD_ENTER", "Enter", 1.0, 2.0, Color.LightGray)),
listOf(Key("LCTRL", "Ctrl", 1.5, 1.0, Color.LightGray), Key("", "", 1.0, 1.0, backgroundColor), Key("LALT", "Alt", 1.5, 1.0, Color.LightGray), Key("SPACE", " ", 7.0, 1.0, Color.White), Key("RALT", "Alt", 1.5, 1.0, Color.LightGray), Key("", "", 1.0, 1.0, backgroundColor), Key("RCTRL", "Ctrl", 1.5, 1.0, Color.LightGray), Key("", "", 0.25, 1.0, backgroundColor), Key("LEFT", "<", 1.0, 1.0, Color.LightGray), Key("DOWN", "v", 1.0, 1.0, Color.LightGray), Key("RIGHT", ">", 1.0, 1.0, Color.LightGray), Key("", "", 0.25, 1.0, backgroundColor), Key("PAD_0", "0", 2.0, 1.0, Color.White), Key("PAD_PERIOD", ".", 1.0, 1.0, Color.White), Key("", " ", 0.0, 1.0, Color.Transparent))), 8)

val ModelFxt_de = keyboard(3, "IBM Model F XT German Layout",
listOf(listOf(Key("F1", "F1", 1.0, 1.0, Color.LightGray), Key("F2", "F2", 1.0, 1.0, Color.LightGray),
Key("", "", 0.25, 1.0, backgroundColor), Key("ESC", "Esc", 1.0, 1.0, Color.LightGray), Key("1", "1", 1.0, 1.0, Color.White), Key("2", "2", 1.0, 1.0, Color.White), Key("3", "3", 1.0, 1.0, Color.White), Key("4", "4", 1.0, 1.0, Color.White), Key("5", "5", 1.0, 1.0, Color.White), Key("6", "6", 1.0, 1.0, Color.White), Key("7", "7", 1.0, 1.0, Color.White), Key("8", "8", 1.0, 1.0, Color.White), Key("9", "9", 1.0, 1.0, Color.White), Key("0", "0", 1.0, 1.0, Color.White), Key("MINUS", "ß", 1.0, 1.0, Color.White), Key("EQUAL", "´", 1.0, 1.0, Color.White), Key("BACKSPACE", "<--", 1.75, 1.0, Color.LightGray), Key("NUM_LOCK", "Num Lock", 2.0, 1.0, Color.LightGray), Key("SCROLL_LOCK", "Scroll Lock", 2.0, 1.0, Color.LightGray)), listOf(Key("F3", "F3", 1.0, 1.0, Color.LightGray), Key("F4","F4", 1.0, 1.0, Color.LightGray),
Key("", "", 0.25, 1.0, backgroundColor), Key("TAB", "-->|", 1.5, 1.0, Color.LightGray), Key("Q", "Q", 1.0, 1.0, Color.White), Key("W", "W", 1.0, 1.0, Color.White), Key("E", "E", 1.0, 1.0, Color.White), Key("R", "R", 1.0, 1.0, Color.White), Key("T", "T", 1.0, 1.0, Color.White), Key("Y", "Z", 1.0, 1.0, Color.White), Key("U", "U", 1.0, 1.0, Color.White), Key("I", "I", 1.0, 1.0, Color.White), Key("O", "O", 1.0, 1.0, Color.White), Key("P", "P", 1.0, 1.0, Color.White), Key("LEFT_BRACE", "Ü", 1.0, 1.0, Color.White), Key("RIGHT_BRACE", "+", 1.25, 1.0, Color.White), Key("ENTER", "<-|", 1.0, 2.0, Color.LightGray), Key("PAD_7", "7", 1.0, 1.0, Color.White), Key("PAD_8", "8", 1.0, 1.0, Color.White), Key("PAD_9", "9", 1.0, 1.0, Color.White), Key("PAD_MINUS", "-", 1.0, 1.0, Color.LightGray)), listOf(Key("F5", "F5", 1.0, 1.0, Color.LightGray), Key("F6", "F6", 1.0, 1.0, Color.LightGray),
Key("", "", 0.25, 1.0, backgroundColor), Key("LCTRL", "Ctrl", 1.75, 1.0, Color.LightGray), Key("A", "A", 1.0, 1.0, Color.White), Key("S", "S", 1.0, 1.0, Color.White), Key("D", "D", 1.0, 1.0, Color.White), Key("F", "F", 1.0, 1.0, Color.White), Key("G", "G", 1.0, 1.0, Color.White), Key("H", "H", 1.0, 1.0, Color.White), Key("J", "J", 1.0, 1.0, Color.White), Key("K", "K", 1.0, 1.0, Color.White), Key("L", "L", 1.0, 1.0, Color.White), Key("SEMICOLON", "Ö", 1.0, 1.0, Color.White), Key("QUOTE", "Ä", 1.0, 1.0, Color.White), Key("BACK_QUOTE", "#", 1.0, 1.0, Color.White), Key("", "", 1.0, 0.0, Color.Transparent), Key("PAD_4", "4", 1.0, 1.0, Color.White), Key("PAD_5", "5", 1.0, 1.0, Color.White), Key("PAD_6", "6", 1.0, 1.0, Color.White), Key("PAD_PLUS", "+", 1.0, 3.0, Color.LightGray)), listOf(Key("F7", "F7", 1.0, 1.0, Color.LightGray), Key("F8", "F8", 1.0, 1.0, Color.LightGray),
Key("", "", 0.25, 1.0, backgroundColor), Key("LSHIFT", "Shift", 1.25, 1.0, Color.LightGray), Key("BACKSLASH", "<", 1.0, 1.0, Color.White), Key("Z", "Y", 1.0, 1.0, Color.White), Key("X", "X", 1.0, 1.0, Color.White), Key("C", "C", 1.0, 1.0, Color.White), Key("V", "V", 1.0, 1.0, Color.White), Key("B", "B", 1.0, 1.0, Color.White), Key("N", "N", 1.0, 1.0, Color.White), Key("M", "M", 1.0, 1.0, Color.White), Key("COMMA", ",", 1.0, 1.0, Color.White), Key("PERIOD", ".", 1.0, 1.0, Color.White), Key("SLASH", "-", 1.0, 1.0, Color.White), Key("RSHIFT", "Shift", 1.5, 1.0, Color.LightGray), Key("PAD_ASTERIX", "*", 1.0, 1.0, Color.LightGray), Key("PAD_1", "1", 1.0, 1.0, Color.White), Key("PAD_2", "2", 1.0, 1.0, Color.White), Key("PAD_3", "3", 1.0, 1.0, Color.White)) , listOf(Key("F9", "F9", 1.0, 1.0, Color.LightGray), Key("F10", "F10", 1.0, 1.0, Color.LightGray), Key("", "", 0.25, 1.0, backgroundColor), Key("LALT", "Alt", 2.0, 1.0, Color.LightGray), Key("SPACE", " ", 10.0, 1.0, Color.White), Key("CAPS_LOCK", "Caps Lock", 1.75, 1.0, Color.LightGray), Key("PAD_0", "0", 2.0, 1.0, Color.White), Key("PAD_PERIOD", ".", 2.0, 1.0, Color.White)) ), 5)

val ModelFxt_en = keyboard(2, "IBM Model F XT English Layout",
listOf(listOf(Key("F1", "F1", 1.0, 1.0, Color.LightGray), Key("F2", "F2", 1.0, 1.0, Color.LightGray),
Expand All @@ -48,7 +54,7 @@ val ModelM122Type3_de = keyboard(1, "IBM Model M 122 Type3 German Layout",listOf

val empty = keyboard(0, "SELECT KEYBOARD", listOf(listOf(Key("", "", 3.25, 1.0, backgroundColor))), 0)

val SCCUIkeyboards = listOf(empty, ModelM122Type3_de, ModelFxt_en, ModelM_ansi)
val SCCUIkeyboards = listOf(empty, ModelM122Type3_de, ModelFxt_en, ModelFxt_de, ModelM_ansi)

fun getKeyboards() : List<keyboard> {
return SCCUIkeyboards
Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/window/SCCUIWindow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ private fun macroList(state: SCCUIWindowState) {
state.metaTriggers[i] = "Left pressed, Right not pressed"
}
}
} else {
state.metaTriggers[i] = ""
}


Expand Down
Loading

0 comments on commit c31146d

Please sign in to comment.