From daf02fa2607fdec86a3ac42f7f4e787aa3f78582 Mon Sep 17 00:00:00 2001 From: Ed van Gasteren Date: Tue, 3 Feb 2026 14:12:32 +0100 Subject: [PATCH 1/5] config: add description to db48x keymap file. The plane numbers where off compared to the "Key positions" documentation. Corrected that. Added a bit of description. This doesn't solve the issue. The changes are of value anyway. Signed-off-by: Ed@vanGasteren.net --- config/db48x.48k | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/config/db48x.48k b/config/db48x.48k index 8e2e11608..41d99fc30 100644 --- a/config/db48x.48k +++ b/config/db48x.48k @@ -1,4 +1,7 @@ -@ PLANE 0: UNSHIFTED +@ Note that the menu / function keys are excluded from the mappings. + +@ Plane 1: unshifted. +@ The command indicated on the key, in white. [ ToolsMenu inv sqrt pow MathMenu UIAlgebraic Store ToggleCustomMenu StackMenu sin cos tan @@ -9,7 +12,8 @@ UILeftShift "1" "2" "3" - UIExit "0" UIDecimal Run + ] -@ PLANE 1: LEFT SHIFTED +@ Plane 2: left shifted (yellow shift key pressed once). +@ The command indicated above the key, on the left side, in yellow. [ LastMenu exp sq abs PowersMenu EquationsMenu ComplexMenu MemoryMenu ConstantsMenu asin acos atan @@ -20,7 +24,8 @@ UIRightShift ToDecimal ToggleUserMode ProgramMenu ListMenu OffWithImage SystemSetup Show "« »" Catalog ] -@ PLANE 2: RIGHT SHIFTED +@ Plane 3: right shifted (blue shifted = yellow shift key pressed twice). +@ The command indicated above the key, on the right side, in blue. [ MainMenu ln xroot AlgebraMenu PartsMenu CharactersMenu RealMenu Library FractionsMenu HyperbolicMenu CircularMenu AnglesMenu @@ -31,7 +36,8 @@ UINoShift DebugMenu LoopsMenu TestsMenu ObjectMenu SaveState FilesMenu GraphicsMenu "{ }" Help ] -@ PLANE 3: ALPHA UNSHIFTED +@ Plane 4: uppercase alpha mode (mode activated with the ALPHA = Shift ENTER key). +@ The command indicated on the right of the key, in white. [ "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" @@ -42,7 +48,9 @@ UILeftShift "X" "Y" "Z" "_" UIExit ": :" "," " " ";" ] -@ PLANE 4: ALPHA LEFT SHIFTED +@ plane 5: uppercase alfa mode, left shifted. +@ The command indicated to the right of the key, in yellow. +@ Keys without such a yellow indication, default to a convenient command, mostly what is on the key, in white. [ "Σ" "^" "√" "∂" "ρ" "(" "▶" "%" "π" "<" "=" ">" @@ -53,7 +61,8 @@ UIRightShift "1" "2" "3" "-" OffWithImage "0" "." "« »" "+" ] -@ PLANE 5: ALPHA RIGHT SHIFTED +@ Plane 6: uppercase alfa mode, right shifted. +@ The command indicated to the right of the key, in blue. [ "∏" "∆" "↑" "μ" "θ" "\" "→" "←" "↓" "≤" "≠" "≥" @@ -65,7 +74,8 @@ UINoShift "&" "@" "$" "…" OffWithImage ";" "·" "{ }" "!' ] -@ PLANE 6: LOWERCASE UNSHIFTED +@ Plane 7: lowercase alpha mode (mode activated with ALPHA ALPHA). +@ The command indicated on the right of the key, in white, in lowercase. [ "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" @@ -76,7 +86,8 @@ UILeftShift "x" "y" "z" "_" UIExit ": :" "," " " ";" ] -@ PLANE 7: LOWERCASE LEFT SHIFTED +@ Plane 8: lowercase alpha mode, left shifted. +@ Intended to give single uppercase characters while in lowercase alpha mode. [ "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" @@ -87,7 +98,8 @@ UIRightShift "X" "Y" "Z" "_" OffWithImage ": :" "," ";" "?" ] -@ PLANE 8: LOWERCASE RIGHT SHIFTED +@ plane 9: lowercase alpha mode, right shifted. +@ Intended to give easey access to some often used greek letters. [ "α" "β" "γ" "δ" "ε" "φ" "Γ" "θ" "Δ" "λ" "λ" "ν" From ad8861d30f4e90701353d008bf292f2ce968aefd Mon Sep 17 00:00:00 2001 From: Ed van Gasteren Date: Wed, 4 Feb 2026 10:54:32 +0100 Subject: [PATCH 2/5] keymap: allow for a quoted @ The code always treated an @ as a start of comment character. That made it impossible to use @ in a double quoted string assigned to a key. I also caused imbalance of the double quotes. That caused incorrect handling of the rest of the file. Now only outside double quotes the @ is handled as a start of comment character. Signed-off-by: Ed@vanGasteren.net --- config/db48x.48k | 2 +- src/user_interface.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/db48x.48k b/config/db48x.48k index 41d99fc30..e82426cb9 100644 --- a/config/db48x.48k +++ b/config/db48x.48k @@ -71,7 +71,7 @@ OffWithImage "0" "." "« »" "+" UIUp "?" "∫" "[" "/" UIDown "#" "∞" "|" "*" UINoShift "&" "@" "$" "…" -OffWithImage ";" "·" "{ }" "!' +OffWithImage ";" "·" "{ }" "!" ] @ Plane 7: lowercase alpha mode (mode activated with ALPHA ALPHA). diff --git a/src/user_interface.cc b/src/user_interface.cc index acfc29b1f..0c9249b34 100644 --- a/src/user_interface.cc +++ b/src/user_interface.cc @@ -5476,7 +5476,7 @@ bool user_interface::load_keymap(cstring name) while (kmap.valid()) { unicode c = kmap.get(); - if (c == '@') + if (c == '@' && !quoted) { do { c = kmap.get(); } while (c && c != '\n'); continue; From a769c3d8a7b06f1f1e63e5f643eb6a31dceda53a Mon Sep 17 00:00:00 2001 From: Ed van Gasteren Date: Thu, 5 Feb 2026 14:37:54 +0100 Subject: [PATCH 3/5] config: fix the single quote in the other keymap files. Signed-off-by: Ed@vanGasteren.net --- config/42style.48k | 2 +- config/legacy.48k | 2 +- config/true42.48k | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/42style.48k b/config/42style.48k index a6131783b..382d542ca 100644 --- a/config/42style.48k +++ b/config/42style.48k @@ -62,7 +62,7 @@ OffWithImage "0" "." "« »" "+" UIUp "?" "∫" "[" "/" UIDown "#" "∞" "|" "*" UINoShift "&" "@" "$" "…" -OffWithImage ";" "·" "{ }" "!' +OffWithImage ";" "·" "{ }" "!" ] @ PLANE 6: LOWERCASE UNSHIFTED diff --git a/config/legacy.48k b/config/legacy.48k index 955242787..69e2bb07b 100644 --- a/config/legacy.48k +++ b/config/legacy.48k @@ -62,7 +62,7 @@ OffWithImage "0" "." "« »" "+" UIUp "?" "∫" "[" "/" UIDown "#" "∞" "|" "*" UINoShift "&" "@" "$" "…" -OffWithImage ";" "·" "{ }" "!' +OffWithImage ";" "·" "{ }" "!" ] @ PLANE 6: LOWERCASE UNSHIFTED diff --git a/config/true42.48k b/config/true42.48k index 29786f977..8df45a0cb 100644 --- a/config/true42.48k +++ b/config/true42.48k @@ -62,7 +62,7 @@ OffWithImage "0" "." "« »" "+" UIUp "?" "∫" "[" "/" UIDown "#" "∞" "|" "*" UINoShift "&" "@" "$" "…" -OffWithImage ";" "·" "{ }" "!' +OffWithImage ";" "·" "{ }" "!" ] @ PLANE 6: LOWERCASE UNSHIFTED From b1a7db5b068dc5ddef13c9d507f9cacc0e4056eb Mon Sep 17 00:00:00 2001 From: Ed van Gasteren Date: Tue, 10 Feb 2026 14:32:52 +0100 Subject: [PATCH 4/5] config: comments and fixes on db48x.48k An other round of description of the file. A few mapping fixes. Signed-off-by: Ed@vanGasteren.net --- config/db48x.48k | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/config/db48x.48k b/config/db48x.48k index e82426cb9..ecf7485f2 100644 --- a/config/db48x.48k +++ b/config/db48x.48k @@ -1,3 +1,12 @@ +@ See "Keyboard interaction" in the Help / Documentation. +@ See "Key positions" in the Help / Documentation for the Plane titles. + +@ Each Plane is an Array or List. +@ There should be 9 planes. +@ Each plane should define 37 Mappings, separated by whitespace. +@ A mapping is either a command or a double quoted string. +@ An unquoted @ character starts a comment. A comment ends with the next newline. + @ Note that the menu / function keys are excluded from the mappings. @ Plane 1: unshifted. @@ -45,12 +54,13 @@ UIEnter "M" "N" "O" UIBackspace UILeft "P" "Q" "R" "S" UIRight "T" "U" "V" "W" UILeftShift "X" "Y" "Z" "_" -UIExit ": :" "," " " ";" +UIExit ": :" "," " " Catalog ] @ plane 5: uppercase alfa mode, left shifted. @ The command indicated to the right of the key, in yellow. -@ Keys without such a yellow indication, default to a convenient command, mostly what is on the key, in white. +@ Keys without such a yellow indication, the numerics and basic number operations, +@ default to what is on the key, in white. [ "Σ" "^" "√" "∂" "ρ" "(" "▶" "%" "π" "<" "=" ">" @@ -58,7 +68,7 @@ UILowercase "⇄" "±" "∡" UIDelete UILeft "7" "8" "9" "÷" UIRight "4" "5" "6" "×" UIRightShift "1" "2" "3" "-" -OffWithImage "0" "." "« »" "+" +OffWithImage "0" UIDecimal "=" "+" ] @ Plane 6: uppercase alfa mode, right shifted. @@ -83,7 +93,7 @@ UIEnter "m" "n" "o" UIBackspace UILeft "p" "q" "r" "s" UIRight "t" "u" "v" "w" UILeftShift "x" "y" "z" "_" -UIExit ": :" "," " " ";" +UIExit ": :" "," " " Catalog ] @ Plane 8: lowercase alpha mode, left shifted. From d1aebb2e03c22ce89a0f3c271598b0d4231856b8 Mon Sep 17 00:00:00 2001 From: Ed van Gasteren Date: Tue, 10 Feb 2026 15:52:19 +0100 Subject: [PATCH 5/5] config: replace rho by sigma in db48x.48k Fixed this discrepancy between overlay and map. Signed-off-by: Ed@vanGasteren.net --- config/db48x.48k | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/db48x.48k b/config/db48x.48k index ecf7485f2..b6c3b1c50 100644 --- a/config/db48x.48k +++ b/config/db48x.48k @@ -62,7 +62,7 @@ UIExit ": :" "," " " Catalog @ Keys without such a yellow indication, the numerics and basic number operations, @ default to what is on the key, in white. [ -"Σ" "^" "√" "∂" "ρ" "(" +"Σ" "^" "√" "∂" "σ" "(" "▶" "%" "π" "<" "=" ">" UILowercase "⇄" "±" "∡" UIDelete UILeft "7" "8" "9" "÷"