diff --git a/BUILD.md b/BUILD.md
index e04a8930a..32f61e174 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -112,17 +112,19 @@ Rember your password!!!
Run fedora and enter:
```bash
+sudo dnf upgrade --refresh
sudo dnf install make
sudo dnf install arm-none-eabi-gcc arm-none-eabi-gcc-cs-c++ arm-none-eabi-newlib
sudo dnf install qt-devel qt6-qtbase-devel qt6-qtdeclarative-devel qt6-qtmultimedia-devel
sudo dnf install freetype-devel
sudo dnf install rsync
+sudo dnf install git
sudo dnf upgrade --refresh
```
## Install and build DB48x
-Run fedora and enter:
+Run fedora by opening Windows PowerShell and entering wsl. Then :
```bash
git clone https://github.com/c3d/db48x.git
@@ -140,15 +142,13 @@ need to run it from the top-level directory if you want the built-in help files
and the configuration files to be found:
```bash
-`./sim/db48x
+./sim/db48x
```
DB48x should run now :-)
## Update DB48x
-Run fedora and enter:
-
```bash
cd db48x
git pull
@@ -162,6 +162,15 @@ Run fedora and enter:
git reset --hard HEAD~1
```
+## Clean up local changes
+
+```bash
+git clean -f
+git checkout .
+git restore .
+```
+
+
## Add Shortcut to Windows (Start-Menu):
### DB48x - WSL terminal
diff --git a/config/42style.48k b/config/42style.48k
deleted file mode 100644
index a6131783b..000000000
--- a/config/42style.48k
+++ /dev/null
@@ -1,100 +0,0 @@
-@ PLANE 0: UNSHIFTED
-[
-ToolsMenu inv sqrt log10 ln UIAlgebraic
-Store ToggleCustomMenu StackMenu sin cos tan
-Duplicate Swap neg Cycle Drop
-StackEditor "7" "8" "9" /
-Edit "4" "5" "6" *
-UILeftShift "1" "2" "3" -
-UIExit "0" UIDecimal Run +
-]
-
-@ PLANE 1: LEFT SHIFTED
-[
-LastMenu pow sq exp10 exp LoopsMenu
-ComplexMenu FractionsMenu ConstantsMenu asin acos atan
-UIAlpha LastArg ModesMenu DisplayModesMenu ClearThingsMenu
-EditorHistory SolverMenu IntegrationMenu "[ ]" StatisticsMenu
-EditMenu BasesMenu UnitsMenu FlagsMenu ProbabilitiesMenu
-UIRightShift ToDecimal ToggleUserMode ProgramMenu ListMenu
-OffWithImage SystemSetup Show "« »" Catalog
-]
-
-@ PLANE 2: RIGHT SHIFTED
-[
-MainMenu xroot PolynomialsMenu PowersMenu PartsMenu EquationsMenu
-MemoryMenu Library MathMenu HyperbolicMenu CircularMenu RealMenu
-UIText Undo ObjectMenu PlotMenu UpDir
-EditorHistory SymbolicMenu DifferentiationMenu MatrixMenu FinanceSolverMenu
-EditMenu TextMenu UnitsConversionsMenu TimeMenu NumbersMenu
-UINoShift DebugMenu CharactersMenu TestsMenu IOMenu
-SaveState FilesMenu GraphicsMenu "{ }" Help
-]
-
-@ PLANE 3: ALPHA UNSHIFTED
-[
-"A" "B" "C" "D" "E" "F"
-"G" "H" "I" "J" "K" "L"
-UIEnter "M" "N" "O" UIBackspace
-UILeft "P" "Q" "R" "S"
-UIRight "T" "U" "V" "W"
-UILeftShift "X" "Y" "Z" "_"
-UIExit ": :" "," " " ";"
-]
-
-@ PLANE 4: ALPHA LEFT SHIFTED
-[
-"Σ" "^" "√" "∂" "ρ" "("
-"▶" "%" "π" "<" "=" ">"
-UILowercase "⇄" "±" "∡" UIDelete
-UILeft "7" "8" "9" "÷"
-UIRight "4" "5" "6" "×"
-UIRightShift "1" "2" "3" "-"
-OffWithImage "0" "." "« »" "+"
-]
-
-@ PLANE 5: ALPHA RIGHT SHIFTED
-[
-"∏" "∆" "↑" "μ" "θ" "\"
-"→" "←" "↓" "≤" "≠" "≥"
-"""" "~" "°" "ε" "
-"
-UIUp "?" "∫" "[" "/"
-UIDown "#" "∞" "|" "*"
-UINoShift "&" "@" "$" "…"
-OffWithImage ";" "·" "{ }" "!'
-]
-
-@ PLANE 6: LOWERCASE UNSHIFTED
-[
-"a" "b" "c" "d" "e" "f"
-"g" "h" "i" "j" "k" "l"
-UIEnter "m" "n" "o" UIBackspace
-UILeft "p" "q" "r" "s"
-UIRight "t" "u" "v" "w"
-UILeftShift "x" "y" "z" "_"
-UIExit ": :" "," " " ";"
-]
-
-@ PLANE 7: LOWERCASE LEFT SHIFTED
-[
-"A" "B" "C" "D" "E" "F"
-"G" "H" "I" "J" "K" "L"
-UINoAlpha "M" "N" "O" UIDelete
-UILeft "P" "Q" "R" "S"
-UIRight "T" "U" "V" "W"
-UIRightShift "X" "Y" "Z" "_"
-OffWithImage ": :" "," ";" "?"
-]
-
-@ PLANE 8: LOWERCASE RIGHT SHIFTED
-[
-"α" "β" "γ" "δ" "ε" "φ"
-"Γ" "θ" "Δ" "λ" "λ" "ν"
-UINoAlpha "Π" "Σ" "ω" "
-"
-UIUp "?" "∫" "[" "/"
-UIDown "#" "∞" "|" "*"
-UINoShift "&" "@" "$" "…"
-OffWithImage ";" "·" "{ }" "!"
-]
diff --git a/config/db48x.48k b/config/db48x.48k
index 8e2e11608..6db25c33b 100644
--- a/config/db48x.48k
+++ b/config/db48x.48k
@@ -1,26 +1,28 @@
-@ PLANE 0: UNSHIFTED
+// Note: THIS plans show the commands that are executed when NOT in the editing mode.
+// Following keys have different functions in editing mode:
+// KEY_BSP, KEY_ENTER, KEY_EXIT, KEY_UP, KEY_DOWN, KEY_CHS, KEY_E (EEX),KEY_RUN
+
+// PLANE 1: UNSHIFTED
[
ToolsMenu inv sqrt pow MathMenu UIAlgebraic
-Store ToggleCustomMenu StackMenu sin cos tan
-Duplicate Swap neg Cycle Drop
+Store ToggleCustomMenu StackMenu sin cos tan
+Duplicate Swap Negate Cycle Drop
StackEditor "7" "8" "9" /
Edit "4" "5" "6" *
UILeftShift "1" "2" "3" -
-UIExit "0" UIDecimal Run +
+UIExit "0" UIDecimal Run +
]
-
-@ PLANE 1: LEFT SHIFTED
+// PLANE 2: LEFT SHIFTED
[
LastMenu exp sq abs PowersMenu EquationsMenu
ComplexMenu MemoryMenu ConstantsMenu asin acos atan
UIAlpha LastArg ModesMenu DisplayModesMenu ClearThingsMenu
-EditorHistory SolverMenu IntegrationMenu "[ ]" StatisticsMenu
+EditorHistory SolverMenu IntegrationMenu "[ ]" StatisticsMenu
EditMenu BasesMenu UnitsMenu FlagsMenu ProbabilitiesMenu
UIRightShift ToDecimal ToggleUserMode ProgramMenu ListMenu
OffWithImage SystemSetup Show "« »" Catalog
]
-
-@ PLANE 2: RIGHT SHIFTED
+// PLANE 3: RIGHT SHIFTED
[
MainMenu ln xroot AlgebraMenu PartsMenu CharactersMenu
RealMenu Library FractionsMenu HyperbolicMenu CircularMenu AnglesMenu
@@ -30,71 +32,63 @@ EditMenu TextMenu UnitsConversionsMenu TimeMenu NumbersMenu
UINoShift DebugMenu LoopsMenu TestsMenu ObjectMenu
SaveState FilesMenu GraphicsMenu "{ }" Help
]
-
-@ PLANE 3: ALPHA UNSHIFTED
+// PLANE 4: ALPHA UNSHIFTED
[
"A" "B" "C" "D" "E" "F"
"G" "H" "I" "J" "K" "L"
-UIEnter "M" "N" "O" UIBackspace
-UILeft "P" "Q" "R" "S"
-UIRight "T" "U" "V" "W"
+Duplicate "M" "N" "O" ""
+StackEditor "P" "Q" "R" "S"
+Edit "T" "U" "V" "W"
UILeftShift "X" "Y" "Z" "_"
-UIExit ": :" "," " " ";"
+UIExit ": :" "," Run Catalog
]
-
-@ PLANE 4: ALPHA LEFT SHIFTED
+// PLANE 5: ALPHA LEFT SHIFTED
[
-"Σ" "^" "√" "∂" "ρ" "("
+"Σ" "^" "√" "∂" "ρ" "( )"
"▶" "%" "π" "<" "=" ">"
-UILowercase "⇄" "±" "∡" UIDelete
-UILeft "7" "8" "9" "÷"
-UIRight "4" "5" "6" "×"
-UIRightShift "1" "2" "3" "-"
-OffWithImage "0" "." "« »" "+"
+UILowercase "⇄" "±" "∡" ""
+EditorHistory "7" "8" "9" "÷"
+EditMenu "4" "5" "6" "×"
+UIRightShift "1" "2" "3" "-"
+OffWithImage "0" UIDecimal "« »" "+"
]
-
-@ PLANE 5: ALPHA RIGHT SHIFTED
+// PLANE 6: ALPHA RIGHT SHIFTED
[
-"∏" "∆" "↑" "μ" "θ" "\"
+"∏" "∆" "↑" "μ" "θ" "' '"
"→" "←" "↓" "≤" "≠" "≥"
-"""" "~" "°" "ε" "
-"
-UIUp "?" "∫" "[" "/"
-UIDown "#" "∞" "|" "*"
+UIText "~" "°" "ε" ""
+EditorHistory "?" "∫" "[" "/"
+EditMenu "#" "∞" "|" "*"
UINoShift "&" "@" "$" "…"
-OffWithImage ";" "·" "{ }" "!'
+SaveState ";" "·" "{ }" "!"
]
-
-@ PLANE 6: LOWERCASE UNSHIFTED
+// PLANE 7: LOWERCASE UNSHIFTED
[
"a" "b" "c" "d" "e" "f"
"g" "h" "i" "j" "k" "l"
-UIEnter "m" "n" "o" UIBackspace
-UILeft "p" "q" "r" "s"
-UIRight "t" "u" "v" "w"
+Duplicate "m" "n" "o" ""
+StackEditor "p" "q" "r" "s"
+Edit "t" "u" "v" "w"
UILeftShift "x" "y" "z" "_"
-UIExit ": :" "," " " ";"
+UIExit ": :" "," Run Catalog
]
-
-@ PLANE 7: LOWERCASE LEFT SHIFTED
+// PLANE 8: LOWERCASE LEFT SHIFTED
[
-"A" "B" "C" "D" "E" "F"
-"G" "H" "I" "J" "K" "L"
-UINoAlpha "M" "N" "O" UIDelete
-UILeft "P" "Q" "R" "S"
-UIRight "T" "U" "V" "W"
-UIRightShift "X" "Y" "Z" "_"
-OffWithImage ": :" "," ";" "?"
+"Σ" "^" "√" "∂" "ρ" "( )"
+"▶" "%" "π" "<" "=" ">"
+UINoAlpha "⇄" "±" "∡" ""
+EditorHistory "7" "8" "9" "÷"
+EditMenu "4" "5" "6" "×"
+UIRightShift "1" "2" "3" "-"
+OffWithImage "0" UIDecimal "« »" "+"
]
-
-@ PLANE 8: LOWERCASE RIGHT SHIFTED
+// PLANE 9: LOWERCASE RIGHT SHIFTED
[
-"α" "β" "γ" "δ" "ε" "φ"
-"Γ" "θ" "Δ" "λ" "λ" "ν"
-UINoAlpha "Π" "Σ" "ω" "
-"
-UIUp "?" "∫" "[" "/"
-UIDown "#" "∞" "|" "*"
-UINoShift "&" "@" "$" "…"
-OffWithImage ";" "·" "{ }" "!"
+"∏" "∆" "↑" "μ" "θ" "' '"
+"→" "←" "↓" "≤" "≠" "≥"
+UIText "~" "°" "ε" ""
+EditorHistory "?" "∫" "[" "/"
+EditMenu "#" "∞" "|" "*"
+UINoShift "&" "@" "$" "…"
+SaveState ";" "·" "{ }" "!"
]
diff --git a/config/legacy.48k b/config/legacy.48k
index 955242787..b1eecfbcf 100644
--- a/config/legacy.48k
+++ b/config/legacy.48k
@@ -1,100 +1,94 @@
-@ PLANE 0: UNSHIFTED
+// Note: THIS plans show the commands that are executed when NOT in the editing mode.
+// Following keys have different functions in editing mode:
+// KEY_BSP, KEY_ENTER, KEY_EXIT, KEY_UP, KEY_DOWN, KEY_CHS, KEY_E (EEX),KEY_RUN
+
+// PLANE 1: UNSHIFTED
[
-ToolsMenu inv sqrt exp ln UIAlgebraic
-Store ToggleCustomMenu StackMenu sin cos tan
-Duplicate Swap neg Cycle Drop
+ToolsMenu inv sqrt log10 ln UIAlgebraic
+Store ToggleCustomMenu StackMenu sin cos tan
+Duplicate Swap Negate Cycle Drop
StackEditor "7" "8" "9" /
Edit "4" "5" "6" *
UILeftShift "1" "2" "3" -
-UIExit "0" UIDecimal Run +
+UIExit "0" UIDecimal Run +
]
-
-@ PLANE 1: LEFT SHIFTED
+// PLANE 2: LEFT SHIFTED
[
-LastMenu pow sq exp10 log10 LoopsMenu
+LastMenu pow sq exp10 exp LoopsMenu
ComplexMenu FractionsMenu ConstantsMenu asin acos atan
UIAlpha LastArg ModesMenu DisplayModesMenu ClearThingsMenu
-EditorHistory SolverMenu IntegrationMenu "[ ]" StatisticsMenu
+EditorHistory SolverMenu IntegrationMenu "[ ]" StatisticsMenu
EditMenu BasesMenu UnitsMenu FlagsMenu ProbabilitiesMenu
UIRightShift ToDecimal ToggleUserMode ProgramMenu ListMenu
OffWithImage SystemSetup Show "« »" Catalog
]
-
-@ PLANE 2: RIGHT SHIFTED
+// PLANE 3: RIGHT SHIFTED
[
MainMenu xroot PolynomialsMenu PowersMenu PartsMenu EquationsMenu
MemoryMenu Library MathMenu HyperbolicMenu CircularMenu RealMenu
UIText Undo ObjectMenu PlotMenu UpDir
-EditorHistory SymbolicMenu DifferentiationMenu MatrixMenu FinanceSolverMenu
+EditorHistory SymbolicMenu DifferentiationMenu MatrixMenu FinanceSolverMenu
EditMenu TextMenu UnitsConversionsMenu TimeMenu NumbersMenu
UINoShift DebugMenu CharactersMenu TestsMenu IOMenu
SaveState FilesMenu GraphicsMenu "{ }" Help
]
-
-@ PLANE 3: ALPHA UNSHIFTED
+// PLANE 4: ALPHA UNSHIFTED
[
"A" "B" "C" "D" "E" "F"
"G" "H" "I" "J" "K" "L"
-UIEnter "M" "N" "O" UIBackspace
-UILeft "P" "Q" "R" "S"
-UIRight "T" "U" "V" "W"
+Duplicate "M" "N" "O" ""
+StackEditor "P" "Q" "R" "S"
+Edit "T" "U" "V" "W"
UILeftShift "X" "Y" "Z" "_"
-UIExit ": :" "," " " ";"
+UIExit ": :" "," Run Catalog
]
-
-@ PLANE 4: ALPHA LEFT SHIFTED
+// PLANE 5: ALPHA LEFT SHIFTED
[
-"Σ" "^" "√" "∂" "ρ" "("
+"Σ" "^" "√" "∂" "ρ" "( )"
"▶" "%" "π" "<" "=" ">"
-UILowercase "⇄" "±" "∡" UIDelete
-UILeft "7" "8" "9" "÷"
-UIRight "4" "5" "6" "×"
-UIRightShift "1" "2" "3" "-"
-OffWithImage "0" "." "« »" "+"
+UILowercase "⇄" "±" "∡" ""
+EditorHistory "7" "8" "9" "÷"
+EditMenu "4" "5" "6" "×"
+UIRightShift "1" "2" "3" "-"
+OffWithImage "0" UIDecimal "« »" "+"
]
-
-@ PLANE 5: ALPHA RIGHT SHIFTED
+// PLANE 6: ALPHA RIGHT SHIFTED
[
-"∏" "∆" "↑" "μ" "θ" "\"
+"∏" "∆" "↑" "μ" "θ" "' '"
"→" "←" "↓" "≤" "≠" "≥"
-"""" "~" "°" "ε" "
-"
-UIUp "?" "∫" "[" "/"
-UIDown "#" "∞" "|" "*"
+UIText "~" "°" "ε" ""
+EditorHistory "?" "∫" "[" "/"
+EditMenu "#" "∞" "|" "*"
UINoShift "&" "@" "$" "…"
-OffWithImage ";" "·" "{ }" "!'
+SaveState ";" "·" "{ }" "!"
]
-
-@ PLANE 6: LOWERCASE UNSHIFTED
+// PLANE 7: LOWERCASE UNSHIFTED
[
"a" "b" "c" "d" "e" "f"
"g" "h" "i" "j" "k" "l"
-UIEnter "m" "n" "o" UIBackspace
-UILeft "p" "q" "r" "s"
-UIRight "t" "u" "v" "w"
+Duplicate "m" "n" "o" ""
+StackEditor "p" "q" "r" "s"
+Edit "t" "u" "v" "w"
UILeftShift "x" "y" "z" "_"
-UIExit ": :" "," " " ";"
+UIExit ": :" "," Run Catalog
]
-
-@ PLANE 7: LOWERCASE LEFT SHIFTED
+// PLANE 8: LOWERCASE LEFT SHIFTED
[
-"A" "B" "C" "D" "E" "F"
-"G" "H" "I" "J" "K" "L"
-UINoAlpha "M" "N" "O" UIDelete
-UILeft "P" "Q" "R" "S"
-UIRight "T" "U" "V" "W"
-UIRightShift "X" "Y" "Z" "_"
-OffWithImage ": :" "," ";" "?"
+"Σ" "^" "√" "∂" "ρ" "( )"
+"▶" "%" "π" "<" "=" ">"
+UINoAlpha "⇄" "±" "∡" ""
+EditorHistory "7" "8" "9" "÷"
+EditMenu "4" "5" "6" "×"
+UIRightShift "1" "2" "3" "-"
+OffWithImage "0" UIDecimal "« »" "+"
]
-
-@ PLANE 8: LOWERCASE RIGHT SHIFTED
+// PLANE 9: LOWERCASE RIGHT SHIFTED
[
-"α" "β" "γ" "δ" "ε" "φ"
-"Γ" "θ" "Δ" "λ" "λ" "ν"
-UINoAlpha "Π" "Σ" "ω" "
-"
-UIUp "?" "∫" "[" "/"
-UIDown "#" "∞" "|" "*"
-UINoShift "&" "@" "$" "…"
-OffWithImage ";" "·" "{ }" "!"
+"∏" "∆" "↑" "μ" "θ" "' '"
+"→" "←" "↓" "≤" "≠" "≥"
+UIText "~" "°" "ε" ""
+EditorHistory "?" "∫" "[" "/"
+EditMenu "#" "∞" "|" "*"
+UINoShift "&" "@" "$" "…"
+SaveState ";" "·" "{ }" "!"
]
diff --git a/config/true42.48k b/config/true42.48k
deleted file mode 100644
index 29786f977..000000000
--- a/config/true42.48k
+++ /dev/null
@@ -1,100 +0,0 @@
-@ PLANE 0: UNSHIFTED
-[
-ToolsMenu inv sqrt log10 ln UIAlgebraic
-Store ToggleCustomMenu StackMenu sin cos tan
-Duplicate Swap neg Cycle Drop
-StackEditor "7" "8" "9" /
-Edit "4" "5" "6" *
-UILeftShift "1" "2" "3" -
-UIExit "0" UIDecimal Run +
-]
-
-@ PLANE 1: LEFT SHIFTED
-[
-LastMenu pow sq exp10 exp LoopsMenu
-ComplexMenu FractionsMenu ConstantsMenu asin acos atan
-UIAlpha LastArg ModesMenu DisplayModesMenu ClearThingsMenu
-EditorHistory SolverMenu IntegrationMenu "[ ]" StatisticsMenu
-EditMenu BasesMenu UnitsMenu FlagsMenu ProbabilitiesMenu
-UIRightShift ToDecimal ToggleUserMode ProgramMenu ListMenu
-Off SystemSetup Show "« »" Catalog
-]
-
-@ PLANE 2: RIGHT SHIFTED
-[
-MainMenu xroot PolynomialsMenu PowersMenu PartsMenu EquationsMenu
-MemoryMenu Library MathMenu HyperbolicMenu CircularMenu RealMenu
-UIText Undo ObjectMenu PlotMenu UpDir
-EditorHistory SymbolicMenu DifferentiationMenu MatrixMenu FinanceSolverMenu
-EditMenu TextMenu UnitsConversionsMenu TimeMenu NumbersMenu
-UINoShift DebugMenu CharactersMenu TestsMenu IOMenu
-SaveState FilesMenu GraphicsMenu "{ }" Help
-]
-
-@ PLANE 3: ALPHA UNSHIFTED
-[
-"A" "B" "C" "D" "E" "F"
-"G" "H" "I" "J" "K" "L"
-UIEnter "M" "N" "O" UIBackspace
-UILeft "P" "Q" "R" "S"
-UIRight "T" "U" "V" "W"
-UILeftShift "X" "Y" "Z" "_"
-UIExit ": :" "," " " ";"
-]
-
-@ PLANE 4: ALPHA LEFT SHIFTED
-[
-"Σ" "^" "√" "∂" "ρ" "("
-"▶" "%" "π" "<" "=" ">"
-UILowercase "⇄" "±" "∡" UIDelete
-UILeft "7" "8" "9" "÷"
-UIRight "4" "5" "6" "×"
-UIRightShift "1" "2" "3" "-"
-OffWithImage "0" "." "« »" "+"
-]
-
-@ PLANE 5: ALPHA RIGHT SHIFTED
-[
-"∏" "∆" "↑" "μ" "θ" "\"
-"→" "←" "↓" "≤" "≠" "≥"
-"""" "~" "°" "ε" "
-"
-UIUp "?" "∫" "[" "/"
-UIDown "#" "∞" "|" "*"
-UINoShift "&" "@" "$" "…"
-OffWithImage ";" "·" "{ }" "!'
-]
-
-@ PLANE 6: LOWERCASE UNSHIFTED
-[
-"a" "b" "c" "d" "e" "f"
-"g" "h" "i" "j" "k" "l"
-UIEnter "m" "n" "o" UIBackspace
-UILeft "p" "q" "r" "s"
-UIRight "t" "u" "v" "w"
-UILeftShift "x" "y" "z" "_"
-UIExit ": :" "," " " ";"
-]
-
-@ PLANE 7: LOWERCASE LEFT SHIFTED
-[
-"A" "B" "C" "D" "E" "F"
-"G" "H" "I" "J" "K" "L"
-UINoAlpha "M" "N" "O" UIDelete
-UILeft "P" "Q" "R" "S"
-UIRight "T" "U" "V" "W"
-UIRightShift "X" "Y" "Z" "_"
-OffWithImage ": :" "," ";" "?"
-]
-
-@ PLANE 8: LOWERCASE RIGHT SHIFTED
-[
-"α" "β" "γ" "δ" "ε" "φ"
-"Γ" "θ" "Δ" "λ" "λ" "ν"
-UINoAlpha "Π" "Σ" "ω" "
-"
-UIUp "?" "∫" "[" "/"
-UIDown "#" "∞" "|" "*"
-UINoShift "&" "@" "$" "…"
-OffWithImage ";" "·" "{ }" "!"
-]
diff --git a/doc/6-ImplementationStatus.md b/doc/6-ImplementationStatus.md
index 0c9444e88..56252a2bc 100644
--- a/doc/6-ImplementationStatus.md
+++ b/doc/6-ImplementationStatus.md
@@ -847,6 +847,7 @@ spellings.
* `UILeft`
* `UILeftShift`
* `UILowercase`
+* `UINewLine`
* `UINoAlpha`
* `UINoShift`
* `UIRight`
@@ -1797,6 +1798,7 @@ The following is an extensive list of commands.
* `UILeft`
* `UILeftShift`
* `UILowercase`
+* `UINewLine`
* `UINoAlpha`
* `UINoShift`
* `UIRight`
@@ -2746,6 +2748,7 @@ The following is an extensive list of commands.
* `UILeft`
* `UILeftShift`
* `UILowercase`
+* `UINewLine`
* `UINoAlpha`
* `UINoShift`
* `UIRight`
diff --git a/help/db48x.md b/help/db48x.md
index 41b410e22..d74ba482d 100644
--- a/help/db48x.md
+++ b/help/db48x.md
@@ -140,6 +140,11 @@ There are three ways to enter *Alpha* mode:
as soon as the arrow key is released. Using _◀︎_ enters uppercase characters,
while _▶︎_ uses lowercase characters.
+ Simulator:
+ hold Shift key ⇧ istead of _◀︎_,
+ hold Alt key ⎇ istead of _▶︎_
+
+
There is no equivalent of the HP48's "single-Alpha" mode. Alpha mode is either
_transient_ (when you hold one of the arrow keys) or _sticky_ (with 🟨 _ENTER_
or by holding 🟨).
@@ -1600,12 +1605,11 @@ Use _Drop_ (_EXIT_) to remove the top value from the stack. This helps keep the
### LastArg to recall last arguments
-Use _LastArg_ (🟦 _ENTER_) to recall the arguments of the last operation. This is useful when you want to repeat a calculation with different parameters.
+Use _LastArg_ (🟨 _M_) to recall the arguments of the last operation. This is useful when you want to repeat a calculation with different parameters.
### Undo to restore previous stack state
-Use _Undo_ (🟦 _EXIT_) to restore the stack to its previous state. This is invaluable for recovering from mistakes or exploring different calculation paths.
-
+Use _Undo_ (🟦 _M_) to restore the stack to its previous state. This is invaluable for recovering from mistakes or exploring different calculation paths.
## The command line
@@ -5409,6 +5413,7 @@ The following is an extensive list of commands.
* `UILeft`
* `UILeftShift`
* `UILowercase`
+* `UINewLine`
* `UINoAlpha`
* `UINoShift`
* `UIRight`
diff --git a/sim/sim-window.cpp b/sim/sim-window.cpp
index fe452bb84..c53ea4225 100644
--- a/sim/sim-window.cpp
+++ b/sim/sim-window.cpp
@@ -556,9 +556,7 @@ void MainWindow::keyPressEvent(QKeyEvent * ev)
static cstring keyboards[] =
{
"config/db48x.48k",
- "config/legacy.48k",
- "config/42style.48k",
- "config/true42.48k",
+ "config/legacy.48k",
};
// HACK - Not thread safe, don't do that while running
diff --git a/sim/sim.qrc b/sim/sim.qrc
index 20e954e4a..56ea03400 100644
--- a/sim/sim.qrc
+++ b/sim/sim.qrc
@@ -1,9 +1,6 @@
- keyboard-db48x.png
- keyboard-db48x-42like.png
keyboard-db48x-old.png
keyboard-db48x.png
- keyboard-dm42.png
diff --git a/src/command.cc b/src/command.cc
index 342a9387c..600e796b6 100644
--- a/src/command.cc
+++ b/src/command.cc
@@ -1760,3 +1760,11 @@ COMMAND_BODY(UIDelete)
{
return ui.do_delete(true) ? OK : ERROR;
}
+
+COMMAND_BODY(UINewLine)
+// ----------------------------------------------------------------------------
+// Insert new line
+// ----------------------------------------------------------------------------
+{
+ return ui.do_new_line() ? OK : ERROR;
+}
diff --git a/src/command.h b/src/command.h
index 3cf862543..96ebbeee1 100644
--- a/src/command.h
+++ b/src/command.h
@@ -212,5 +212,6 @@ COMMAND_DECLARE(UIUp,-1); // Actions related to up key
COMMAND_DECLARE(UIDown,-1); // Actions related to down key
COMMAND_DECLARE(UIBackspace,-1); // Actions related to backspace
COMMAND_DECLARE(UIDelete,-1); // Action related to delete
+COMMAND_DECLARE(UINewLine,-1); // Action related to new line
#endif // COMMAND_H
diff --git a/src/ids.tbl b/src/ids.tbl
index fb5c1529d..8b06cd05e 100644
--- a/src/ids.tbl
+++ b/src/ids.tbl
@@ -1393,6 +1393,7 @@ CMD(UIUp)
CMD(UIDown)
CMD(UIBackspace)
CMD(UIDelete)
+CMD(UINewLine)
CMD(EditorSelect)
CMD(EditorWordLeft)
diff --git a/src/user_interface.cc b/src/user_interface.cc
index acfc29b1f..7ef777810 100644
--- a/src/user_interface.cc
+++ b/src/user_interface.cc
@@ -657,19 +657,17 @@ bool user_interface::key(int key, bool repeating, bool talpha)
return true;
}
}
-
- // Handle keys
- bool result =
+
+ bool result =
handle_shifts(key, talpha) ||
handle_help(key) ||
+ handle_search(key) ||
+ handle_based(key) ||
handle_user(key) ||
handle_editing(key) ||
- handle_alpha(key) ||
- handle_digits(key) ||
handle_functions(key) ||
key == 0;
-
- if (rt.editing())
+ if (rt.editing())
update_mode();
if (!skey && last != KEY_SHIFT)
@@ -1169,7 +1167,7 @@ bool user_interface::replace_character_left_of_cursor(unicode code)
bool user_interface::replace_character_left_of_cursor(symbol_p sym)
// ----------------------------------------------------------------------------
-// Replace the character left of cursor with teh symbol
+// Replace the character left of cursor with the symbol
// ----------------------------------------------------------------------------
{
size_t len = 0;
@@ -2274,12 +2272,14 @@ bool user_interface::draw_annunciators()
if (alpha || user)
{
static cstring lbls[] = {
- "", "ABC", "abc", "abc",
- "USR", "αUS", "usr", "αus",
- "", "ABC", "abc", "abc",
- "1US", "α1U", "1us", "α1u"
+ " ", " A", " a",
+ "U ", "UA", "Ua",
+ "1 ", "1A", "1a",
};
- utf8 label = utf8(lbls[alpha + 2*lowercase + 4*user + 8*userOnce]);
+ uint kc = 1 * alpha + 1 * (lowercase && alpha);
+ if (user) kc +=3;
+ if (userOnce) kc +=3;
+ utf8 label = utf8(lbls[kc]);
pattern apat = lowercase
? Settings.LowerAlphaForeground()
: Settings.AlphaForeground();
@@ -4174,18 +4174,32 @@ bool user_interface::handle_help(int &key)
record(help,
"Looking for help topic for key %d, long = %d shift=%d\n",
key, longpress, shift_plane());
- if (object_p obj = object_for_key(key))
+
+
+
+ object_p obj;
+ bool objOk = false;
+ if (Settings.UserMode())
+ {
+ uint kc = platform_keyid(key,
+ shift, xshift,
+ alpha, lowercase, transalpha);
+ if (obj= assigned(kc)) objOk = true;
+ }
+ if (!objOk)
+ if ( obj = object_for_key(key,shift_plane(),alpha_plane())) objOk = true;
+ if (objOk)
{
record(help, "Looking for help topic for key %d\n", key);
save seval(evaluating, key);
if (utf8 htopic = obj->help())
{
record(help, "Help topic is %s\n", htopic);
- if (!rt.editing())
- {
- command = htopic;
- dirtyCommand = true;
- }
+
+
+ command = htopic;
+ dirtyCommand = true;
+
if (longpress)
{
rt.command(command::static_object(object::ID_Help));
@@ -4208,8 +4222,11 @@ bool user_interface::handle_help(int &key)
else
{
if (!noHelpForKey(last))
+ {
key = last; // Time to evaluate
- last = 0;
+ dirtyStack = true;
+ }
+ last = 0;
}
// Help keyboard movements only applies when help is shown
@@ -4442,25 +4459,6 @@ bool user_interface::handle_shifts(int &key, bool talpha)
}
consumed = true;
}
- else if (shift && key == KEY_ENTER)
- {
- // Cycle ABC -> abc -> non alpha
- if (alpha)
- {
- if (lowercase)
- alpha = lowercase = false;
- else
- lowercase = true;
- }
- else
- {
- alpha = true;
- }
- consumed = true;
- shift = false;
- key = last = 0;
- }
-
if (key)
last = key;
return consumed;
@@ -4472,8 +4470,8 @@ bool user_interface::handle_editing(int key)
// Some keys always deal with editing
// ----------------------------------------------------------------------------
{
- bool consumed = false;
- size_t isEditing = rt.editing();
+ bool editing = rt.editing();
+
if (uint interactive = Stack.interactive)
{
@@ -4750,60 +4748,6 @@ bool user_interface::handle_editing(int key)
return true;
}
- // Some editing keys that do not depend on data entry mode
- if (!alpha)
- {
- switch(key)
- {
- case KEY_XEQ:
- // XEQ is used to enter algebraic / equation objects
- if (!shift && !xshift)
- if (do_algebraic())
- return true;
- break;
- case KEY_RUN:
- if (shift)
- {
- // Shift R/S = PRGM enters a program symbol
- if (isEditing && (mode == ALGEBRAIC || mode == PARENTHESES))
- insert('=', ALGEBRAIC);
- else
- insert(L'«', PROGRAM);
- last = 0;
- return true;
- }
- else if (xshift)
- {
- insert('{', PROGRAM);
- last = 0;
- return true;
- }
- else if (isEditing)
- {
- // Stick to space role while editing, do not EVAL, repeat
- if (mode == PARENTHESES)
- insert(';', PARENTHESES);
- else if (mode == ALGEBRAIC)
- insert('=', ALGEBRAIC);
- else
- insert(' ', PROGRAM);
- repeat = true;
- return true;
- }
- break;
-
- case KEY_9:
- if (shift)
- {
- // Shift-9 enters a matrix
- insert('[', MATRIX);
- last = 0;
- return true;
- }
- break;
- }
- }
-
// Transient alpha editor keys (bring up the editor if needed)
switch(key)
{
@@ -4827,91 +4771,54 @@ bool user_interface::handle_editing(int key)
EditMenu::ID_EditorClear);
}
- if (isEditing)
+ if (editing)
{
record(user_interface, "Editing key %d", key);
switch (key)
{
case KEY_BSP:
if (xshift)
- return false;
+ return do_new_line();
return do_delete(shift);
case KEY_ENTER:
- {
// Finish editing and parse the result
if (!shift && !xshift)
return do_enter();
return false;
- }
case KEY_EXIT:
// Clear error if there is one, else clear editor
if (shift || xshift)
return false;
-
return do_exit();
-
case KEY_UP:
if (shift)
return do_up();
if (xshift)
return editor_history();
return do_left();
-
case KEY_DOWN:
if (shift)
return do_down();
if (xshift)
return false;
return do_right();
- case 0:
+ case KEY_CHS:
+ if (!shift && !xshift && !alpha)
+ return editing_chs();
return false;
- }
- }
- else
- {
- switch(key)
- {
- case KEY_ENTER:
- if (xshift)
- return do_text();
- break;
- case KEY_EXIT:
- if (shift || xshift)
- return false;
- alpha = false;
- lowercase = false;
- if (Settings.ExitClearsMenu())
- clear_menu();
- return true;
- case KEY_DOWN:
- // Key down to edit last object on stack
+ case KEY_E:
if (!shift && !xshift && !alpha)
- if (do_edit())
- return true;
- break;
- case KEY_UP:
- if (xshift)
- {
- editor_history();
- return true;
- }
- else if (!shift)
- {
- if (rt.args(rt.depth()))
- {
- if (++Stack.interactive > rt.depth())
- Stack.interactive = rt.depth();
- dirtyStack = true;
- dirtyMenu = true;
- }
- return true;
- }
- break;
-
+ return editing_eex_or_cycle_prefixes();
+ return false;
+ case KEY_RUN:
+ if (!shift && !xshift)
+ return editing_spc_equal_semicolon();
+ return false;
+ case 0:
+ return false;
}
- }
-
- return consumed;
+ }
+ return false;
}
@@ -4944,513 +4851,113 @@ bool user_interface::handle_editing_command(object::id lo, object::id hi)
}
-bool user_interface::handle_alpha(int key)
+bool user_interface::handle_search(int key)
// ----------------------------------------------------------------------------
-// Handle alphabetic user_interface
+// Handle keys in search mode
// ----------------------------------------------------------------------------
{
- // Things that we never handle in alpha mode
- if (!key || (key >= KEY_F1 && key <= KEY_F6) || key == KEY_EXIT)
+ if (key >= KEY_F1 && key <= KEY_F6)
+ return false;
+ if (!key || !~searching)
+ return false;
+ unicode c = 0;
+ switch (key)
+ {
+ case KEY_BSP:
+ if (xshift) { c='\n'; break; }
+ return do_delete(shift);
+ case KEY_ENTER:
+ if (xshift) { c='\"'; break; }
return false;
-
- // Allow "alpha" mode for keys A-F in based number mode
- // xshift-ENTER inserts quotes, xshift-BSP inserts \n
- bool editing = rt.editing();
- bool hex = editing && !alpha && mode == BASED && key >= KB_A && key <= KB_F;
- bool special = xshift && (key == KEY_ENTER || (key == KEY_BSP && editing));
- if (!alpha && !hex && !special)
+ case KEY_EXIT:
+ return do_enter();
+ case KEY_UP:
return false;
-
- static const char upper[] =
- "ABCDEF"
- "GHIJKL"
- "_MNO_"
- "_PQRS"
- "_TUVW"
- "_XYZ_"
- "_:, ;";
- static const char lower[] =
- "abcdef"
- "ghijkl"
- "_mno_"
- "_pqrs"
- "_tuvw"
- "_xyz_"
- "_:, ;";
-
- static const unicode shifted[] =
- {
- L'Σ', '^', L'√', L'∂', L'σ', '(',
- L'▶', '%', L'π', '<', '=', '>',
- '_', L'⇄', L'±', L'∡', '_',
- '_', '7', '8', '9', L'÷',
- '_', '4', '5', '6', L'×',
- '_', '1', '2', '3', '-',
- '_', '0', '.', L'«', '+'
- };
-
- static const unicode xshifted[] =
- {
- L'∏', L'∆', L'↑', L'μ', L'θ', '\'',
- L'→', L'←', L'↓', L'≤', L'≠', L'≥',
- '"', '~', L'°', L'ε', '\n',
- '_', '?', L'∫', '[', '/',
- '_', '#', L'∞', '|' , '*',
- '_', '&', '@', '$', L'…',
- '_', ';', L'·', '{', '!'
- };
-
- // Special case: + in alpha mode shows the catalog
- if (key == KEY_ADD && !shift && !xshift)
- {
- object_p cat = command::static_object(menu::ID_Catalog);
- cat->evaluate();
- return true;
- }
-
- key--;
- unicode c =
- hex ? upper[key] :
- xshift ? xshifted[key] :
- shift ? shifted[key] :
- lowercase ? lower[key] :
- upper[key];
- if (~searching)
- {
- if (!do_search(c))
- beep(2400, 100);
- }
- else
- {
- if (menu_p m = menu())
- {
- menu::id mid = m->type();
- if (mid >= menu::ID_CharactersMenu00 &&
- mid <= menu::ID_CharactersMenu99)
- {
- character_menu_p cm = character_menu_p(m);
- if (cm->transliterate(c))
- {
- size_t edlen = rt.editing();
- utf8 ed = rt.editor();
- if (ed && edlen)
- {
- uint ppos = utf8_previous(ed, cursor);
- if (ppos != cursor)
- remove(ppos, cursor - ppos);
- }
- }
- }
- }
- insert(c, DIRECT);
- if (c == '"')
- alpha = true;
- repeat = true;
- menu_refresh(object::ID_Catalog, true);
- }
- return true;
-}
-
-
-bool user_interface::handle_digits(int key)
-// ----------------------------------------------------------------------------
-// Handle alphabetic user_interface
-// ----------------------------------------------------------------------------
-{
- if (alpha || shift || xshift || !key)
+ case KEY_DOWN:
return false;
-
- static const char numbers[] =
- "______"
- "______"
- "__-__"
- "_789_"
- "_456_"
- "_123_"
- "_0.__";
-
- if (rt.editing())
- {
- if (key == KEY_CHS)
- {
- // Special case for change of sign
- byte *ed = rt.editor();
- byte *p = ed + cursor;
- utf8 found = nullptr;
- unicode c = utf8_codepoint(p);
- unicode dm = Settings.DecimalSeparator();
- unicode ns = Settings.NumberSeparator();
- unicode hs = Settings.BasedSeparator();
- bool had_complex = false;
- while (p > ed && !found)
- {
- p = (byte *) utf8_previous(p);
- c = utf8_codepoint(p);
- if (c == complex::I_MARK || c == complex::ANGLE_MARK)
- {
- had_complex = true;
- if (c == complex::ANGLE_MARK)
- {
- found = utf8_next(p);
- }
- else
- {
- found = p;
- p = (byte *) utf8_previous(p);
- c = utf8_codepoint(p);
- }
- }
- else if ((c < '0' || c > '9') && c != dm && c != ns && c != hs)
- {
- found = utf8_next(p);
- }
- }
-
- if (!found)
- found = ed;
- if (c == 'e' || c == 'E' || c == Settings.ExponentSeparator())
- c = utf8_codepoint(p);
-
- if (had_complex)
- {
- if (c == '+' || c == '-')
- *p = '+' + '-' - c;
- else
- insert(found - ed, '-');
- }
- else if (c == '-')
- {
- remove(p - ed, 1);
- }
- else
- {
- insert(found - ed, '-');
- }
- last = 0;
- dirtyEditor = true;
- return true;
- }
- else if (key == KEY_E && !~searching)
- {
- if (mode == UNIT)
- {
- utf8 start = nullptr;
- size_t len = 0;
- if (current_word(start, len))
- {
- byte *ed = rt.editor();
- byte *st = (byte *) start;
- bool ins = true;
- bool del = false;
- utf8 cycle = utf8("kcmμMGTpn"); // Default cycle
- size_t cylen = strlen(cstring(cycle));
- if (object_p name = unit::si_prefixes_variable())
- if (object_p si = directory::recall_all(name, false))
- if (text_p txt = si->as())
- cycle = txt->value(&cylen);
-
- if (len == 3 && st[1] == 'm' && st[2] == 's')
- {
- if (st[0] == 'd' || st[0] == 'h')
- {
- cylen = 0;
- st[0] = st[0] == 'd' ? 'h' : 'd';
- }
- }
-
- if (cylen)
- {
- unicode prefix = utf8_codepoint(cycle);
- size_t toremove = 1;
- if (len > 1)
- {
- unicode existing = utf8_codepoint(st);
- utf8 cyend = cycle + cylen;
- ins = true;
- while (cycle < cyend)
- {
- utf8 ncycle = utf8_next(cycle);
- if (existing == utf8_codepoint(cycle))
- {
- if (ncycle < cyend)
- prefix = utf8_codepoint(ncycle);
- else
- del = true;
- toremove = utf8_size(existing);
- ins = false;
- break;
- }
- cycle = ncycle;
- }
- }
-
- if (del &&
- size_t(st - ed + 1) < rt.editing() &&
- is_valid_in_name(start))
- {
- remove(st - ed, toremove);
- }
- else
+ case KEY_E:
+ if (!alpha && !shift && !xshift) c=Settings.ExponentSeparator();
+ break;
+ case KEY_DOT:
+ if (!shift && !xshift) c ='.';
+ break;
+ case KEY_RUN:
+ if (!shift && !xshift) c =' ';
+ break;
+ }
+ object_p obj;
+ bool found = false;
+ bool objOk = false;
+ utf8 txt;
+ if (c == 0)
+ {
+ if (Settings.UserMode())
+ {
+ uint kc = platform_keyid(key,shift,xshift,alpha,lowercase,transalpha);
+ if (obj = assigned(kc)) objOk = true;
+ }
+ if (!objOk)
+ if ( obj = object_for_key(key,shift_plane(),alpha_plane())) objOk = true;
+ if (objOk)
+ {
+ bool usetxt = false;
+ size_t len = 0;
+ if (text_p direct = obj->as_text())
+ {
+
+ txt = direct->value(&len);
+ usetxt = true;
+ }
+ if (usetxt)
+ {
+ c = utf8_codepoint(txt);
+ found = true;
+ for(int i=0;i0 && c=='\"') break;
+ if (found)
+ if (!do_search(c))
{
- if (!ins && (size_t(st - ed + 1) >= rt.editing() ||
- !is_valid_in_name(start)))
- {
- ins = true;
- prefix = utf8_codepoint(cycle);
- }
- if (ins)
- {
- insert(st - ed, prefix);
- }
- else
- {
- remove(st - ed, toremove);
- insert(st - ed, prefix);
- }
+ fprintf(stderr,"(beep)");
+ found = false;
}
- }
- }
- }
- else
- {
- byte buf[4];
- size_t sz = utf8_encode(Settings.ExponentSeparator(), buf);
- insert(cursor, buf, sz);
- }
- last = 0;
- dirtyEditor = true;
- return true;
-
- }
- }
- if (key > KEY_CHS && key < KEY_F1)
- {
- unicode c = numbers[key - 1];
- if (~searching)
- {
- bool found = false;
- switch (key)
- {
- case KEY_ADD: found = do_search('+'); break;
- case KEY_SUB: found = do_search('-'); break;
- case KEY_MUL: found = do_search('*')||do_search(L'×')
- ||do_search(L'·'); break;
- case KEY_DIV: found = do_search('/')||do_search(L'÷'); break;
- case KEY_DOT: found = do_search('.')||do_search(L','); break;
- case KEY_E: found = do_search('E')||do_search(L''); break;
- default:
- if (c == '_')
- return false;
- found = do_search(c);
- break;
- }
- if (!found)
- beep(2400, 100);
- return true;
- }
- if (c == '_')
- return false;
- if (c == '.' && mode != TEXT)
- return do_decimal_separator();
- insert(c, DIRECT);
- repeat = true;
- return true;
- }
- return false;
+ fprintf(stderr,"%c",c);
+ txt = utf8_next(txt);
+ c = utf8_codepoint(txt);
+ }
+ fprintf(stderr," ");
+ }
+ }
+ }
+ else
+ {
+ if (do_search(c))
+ found = true;
+ }
+ if (!found)
+ beep(2400, 100); //not found sound
+ return true;
}
-
-// ============================================================================
-//
-// Tables with the default assignments
-//
-// ============================================================================
-
-static const byte defaultUnshiftedCommand[2*user_interface::NUM_KEYS] =
-// ----------------------------------------------------------------------------
-// RPL code for the commands assigned by default to each key
-// ----------------------------------------------------------------------------
-// All the default-assigned commands fit in one or two bytes
-{
-#define OP2BYTES(key, id) \
- [2*(key) - 2] = (id) < 0x80 ? (id) & 0x7F : ((id) & 0x7F) | 0x80, \
- [2*(key) - 1] = (id) < 0x80 ? 0 : ((id) >> 7)
-
- OP2BYTES(KEY_SIGMA, menu::ID_ToolsMenu),
- OP2BYTES(KEY_INV, function::ID_inv),
- OP2BYTES(KEY_SQRT, function::ID_sqrt),
- OP2BYTES(KEY_LOG, function::ID_pow),
- OP2BYTES(KEY_LN, function::ID_MathMenu),
- OP2BYTES(KEY_XEQ, 0),
- OP2BYTES(KEY_STO, command::ID_Sto),
- OP2BYTES(KEY_RCL, command::ID_ToggleCustomMenu),
- OP2BYTES(KEY_RDN, menu::ID_StackMenu),
- OP2BYTES(KEY_SIN, function::ID_sin),
- OP2BYTES(KEY_COS, function::ID_cos),
- OP2BYTES(KEY_TAN, function::ID_tan),
- OP2BYTES(KEY_ENTER, function::ID_Dup),
- OP2BYTES(KEY_SWAP, function::ID_Swap),
- OP2BYTES(KEY_CHS, function::ID_neg),
- OP2BYTES(KEY_E, function::ID_Cycle),
- OP2BYTES(KEY_BSP, command::ID_Drop),
- OP2BYTES(KEY_UP, 0),
- OP2BYTES(KEY_7, 0),
- OP2BYTES(KEY_8, 0),
- OP2BYTES(KEY_9, 0),
- OP2BYTES(KEY_DIV, arithmetic::ID_divide),
- OP2BYTES(KEY_DOWN, 0),
- OP2BYTES(KEY_4, 0),
- OP2BYTES(KEY_5, 0),
- OP2BYTES(KEY_6, 0),
- OP2BYTES(KEY_MUL, arithmetic::ID_multiply),
- OP2BYTES(KEY_SHIFT, 0),
- OP2BYTES(KEY_1, 0),
- OP2BYTES(KEY_2, 0),
- OP2BYTES(KEY_3, 0),
- OP2BYTES(KEY_SUB, command::ID_subtract),
- OP2BYTES(KEY_EXIT, 0),
- OP2BYTES(KEY_0, 0),
- OP2BYTES(KEY_DOT, 0),
- OP2BYTES(KEY_RUN, command::ID_Run),
- OP2BYTES(KEY_ADD, command::ID_add),
-
- OP2BYTES(KEY_F1, 0),
- OP2BYTES(KEY_F2, 0),
- OP2BYTES(KEY_F3, 0),
- OP2BYTES(KEY_F4, 0),
- OP2BYTES(KEY_F5, 0),
- OP2BYTES(KEY_F6, 0),
-
- OP2BYTES(KEY_SCREENSHOT, command::ID_ScreenCapture),
- OP2BYTES(KEY_SH_UP, 0),
- OP2BYTES(KEY_SH_DOWN, 0),
-};
-
-
-static const byte defaultShiftedCommand[2*user_interface::NUM_KEYS] =
-// ----------------------------------------------------------------------------
-// RPL code for the commands assigned by default to shifted keys
-// ----------------------------------------------------------------------------
-// All the default assigned commands fit in one or two bytes
-{
- OP2BYTES(KEY_SIGMA, menu::ID_LastMenu),
- OP2BYTES(KEY_INV, arithmetic::ID_exp),
- OP2BYTES(KEY_SQRT, arithmetic::ID_sq),
- OP2BYTES(KEY_LOG, function::ID_abs),
- OP2BYTES(KEY_LN, function::ID_PowersMenu),
- OP2BYTES(KEY_XEQ, menu::ID_EquationsMenu),
- OP2BYTES(KEY_STO, menu::ID_ComplexMenu),
- OP2BYTES(KEY_RCL, menu::ID_MemoryMenu),
- OP2BYTES(KEY_RDN, menu::ID_ConstantsMenu),
- OP2BYTES(KEY_SIN, function::ID_asin),
- OP2BYTES(KEY_COS, function::ID_acos),
- OP2BYTES(KEY_TAN, function::ID_atan),
- OP2BYTES(KEY_ENTER, 0), // Alpha
- OP2BYTES(KEY_SWAP, menu::ID_LastArg),
- OP2BYTES(KEY_CHS, menu::ID_ModesMenu),
- OP2BYTES(KEY_E, menu::ID_DisplayModesMenu),
- OP2BYTES(KEY_BSP, menu::ID_ClearThingsMenu),
- OP2BYTES(KEY_UP, 0),
- OP2BYTES(KEY_7, menu::ID_SolverMenu),
- OP2BYTES(KEY_8, menu::ID_IntegrationMenu),
- OP2BYTES(KEY_9, 0), // Insert []
- OP2BYTES(KEY_DIV, menu::ID_StatisticsMenu),
- OP2BYTES(KEY_DOWN, 0),
- OP2BYTES(KEY_4, menu::ID_BasesMenu),
- OP2BYTES(KEY_5, menu::ID_UnitsMenu),
- OP2BYTES(KEY_6, menu::ID_FlagsMenu),
- OP2BYTES(KEY_MUL, menu::ID_ProbabilitiesMenu),
- OP2BYTES(KEY_SHIFT, 0),
- OP2BYTES(KEY_1, function::ID_ToDecimal),
- OP2BYTES(KEY_2, command::ID_ToggleUserMode),
- OP2BYTES(KEY_3, menu::ID_ProgramMenu),
- OP2BYTES(KEY_SUB, menu::ID_ListMenu),
- OP2BYTES(KEY_EXIT, command::ID_OffWithImage),
- OP2BYTES(KEY_0, command::ID_SystemSetup),
- OP2BYTES(KEY_DOT, command::ID_Show),
- OP2BYTES(KEY_RUN, 0),
- OP2BYTES(KEY_ADD, menu::ID_Catalog),
-
- OP2BYTES(KEY_F1, 0),
- OP2BYTES(KEY_F2, 0),
- OP2BYTES(KEY_F3, 0),
- OP2BYTES(KEY_F4, 0),
- OP2BYTES(KEY_F5, 0),
- OP2BYTES(KEY_F6, 0),
-
- OP2BYTES(KEY_SCREENSHOT, command::ID_ScreenCapture),
- OP2BYTES(KEY_SH_UP, 0),
- OP2BYTES(KEY_SH_DOWN, 0),
-};
-
-
-static const byte defaultSecondShiftedCommand[2*user_interface::NUM_KEYS] =
-// ----------------------------------------------------------------------------
-// RPL code for the commands assigned by default to long-shifted keys
-// ----------------------------------------------------------------------------
-// All the default assigned commands fit in one or two bytes
-{
- OP2BYTES(KEY_SIGMA, menu::ID_MainMenu),
- OP2BYTES(KEY_INV, command::ID_ln),
- OP2BYTES(KEY_SQRT, menu::ID_xroot),
- OP2BYTES(KEY_LOG, menu::ID_AlgebraMenu),
- OP2BYTES(KEY_LN, menu::ID_PartsMenu),
- OP2BYTES(KEY_XEQ, menu::ID_CharactersMenu),
- OP2BYTES(KEY_STO, menu::ID_RealMenu),
- OP2BYTES(KEY_RCL, menu::ID_Library),
- OP2BYTES(KEY_RDN, menu::ID_FractionsMenu),
- OP2BYTES(KEY_SIN, menu::ID_HyperbolicMenu),
- OP2BYTES(KEY_COS, menu::ID_CircularMenu),
- OP2BYTES(KEY_TAN, menu::ID_AnglesMenu),
- OP2BYTES(KEY_ENTER, 0), // Text
- OP2BYTES(KEY_SWAP, function::ID_Undo),
- OP2BYTES(KEY_CHS, menu::ID_UserInterfaceModesMenu),
- OP2BYTES(KEY_E, menu::ID_PlotMenu),
- OP2BYTES(KEY_BSP, function::ID_UpDir),
- OP2BYTES(KEY_UP, 0),
- OP2BYTES(KEY_7, menu::ID_SymbolicMenu),
- OP2BYTES(KEY_8, menu::ID_PolynomialsMenu),
- OP2BYTES(KEY_9, menu::ID_MatrixMenu),
- OP2BYTES(KEY_DIV, menu::ID_FinanceSolverMenu),
- OP2BYTES(KEY_DOWN, menu::ID_EditMenu),
- OP2BYTES(KEY_4, menu::ID_TextMenu),
- OP2BYTES(KEY_5, menu::ID_UnitsConversionsMenu),
- OP2BYTES(KEY_6, menu::ID_TimeMenu),
- OP2BYTES(KEY_MUL, menu::ID_NumbersMenu),
- OP2BYTES(KEY_SHIFT, 0),
- OP2BYTES(KEY_1, menu::ID_DebugMenu),
- OP2BYTES(KEY_2, menu::ID_LoopsMenu),
- OP2BYTES(KEY_3, menu::ID_TestsMenu),
- OP2BYTES(KEY_SUB, menu::ID_IOMenu),
- OP2BYTES(KEY_EXIT, command::ID_SaveState),
- OP2BYTES(KEY_0, menu::ID_FilesMenu),
- OP2BYTES(KEY_DOT, menu::ID_GraphicsMenu),
- OP2BYTES(KEY_RUN, 0),
- OP2BYTES(KEY_ADD, command::ID_Help),
-
- OP2BYTES(KEY_F1, 0),
- OP2BYTES(KEY_F2, 0),
- OP2BYTES(KEY_F3, 0),
- OP2BYTES(KEY_F4, 0),
- OP2BYTES(KEY_F5, 0),
- OP2BYTES(KEY_F6, 0),
-
- OP2BYTES(KEY_SCREENSHOT, command::ID_ScreenCapture),
- OP2BYTES(KEY_SH_UP, 0),
- OP2BYTES(KEY_SH_DOWN, 0),
-};
-
-
-static const byte *const defaultCommand[user_interface::NUM_PLANES] =
+bool user_interface::handle_based(int key)
// ----------------------------------------------------------------------------
-// Pointers to the default commands
+// Handle insert of based numbers (A-F)
// ----------------------------------------------------------------------------
{
- defaultUnshiftedCommand,
- defaultShiftedCommand,
- defaultSecondShiftedCommand,
-};
+ if (!key || mode != BASED || !rt.editing())
+ return false;
+ if (key >= KB_A && key <= KB_F)
+ {
+ uint plane = 0;
+ uint alpha_plane = 1;
+ record(user_interface,
+ "Handle function for key %d (plane %d) ", key, plane);
+ if (object_p obj = object_for_key(key,plane,alpha_plane))
+ return handle_functions(key, obj, false);
+ }
+ return false;
+}
bool user_interface::load_keymap(cstring name)
@@ -5472,13 +4979,16 @@ bool user_interface::load_keymap(cstring name)
scribble scr;
bool quoted = false;
list_g result;
-
+ unicode c;
+ unicode d = ' ';
while (kmap.valid())
{
- unicode c = kmap.get();
- if (c == '@')
+ c = d;
+ d = kmap.get();
+ if (c == '/' && d == '/' && !quoted) //skip comments (//) till newline arrives.
{
- do { c = kmap.get(); } while (c && c != '\n');
+ do { d = kmap.get(); } while (d != '\n');
+ d = kmap.get();
continue;
}
if (c == '"')
@@ -5546,30 +5056,30 @@ bool user_interface::load_keymap(cstring name)
}
-object_p user_interface::object_for_key(int key)
+object_p user_interface::object_for_key(int key,uint plane, uint alpha_plane)
// ----------------------------------------------------------------------------
// Return the object for a given key
// ----------------------------------------------------------------------------
{
object_p obj = nullptr;
- uint plane = shift_plane();
+ if (keymap && key > 0 && key <= NUM_KEYS)
+ if (object_p planeobj = keymap->at(plane + NUM_PLANES * alpha_plane))
+ {
+ if (list_p plane = planeobj->as_array_or_list())
+ {
+ if (object_p keyobj = plane->at(key-1))
+ {
+ return keyobj;
+ }
+ }
+ }
if (key >= KEY_F1 && key <= KEY_F6)
{
uint fplane = plane < menu_planes() ? plane : 0;
obj = function[fplane][key - KEY_F1];
if (obj)
return obj;
- }
-
- if (keymap && key > 0 && key <= NUM_KEYS)
- if (object_p planeobj = keymap->at(plane + NUM_PLANES * alpha_plane()))
- if (list_p plane = planeobj->as_array_or_list())
- if (object_p keyobj = plane->at(key-1))
- return keyobj;
-
- const byte *ptr = defaultCommand[plane] + 2 * (key - 1);
- if (*ptr)
- obj = (object_p) ptr;
+ }
return obj;
}
@@ -5584,7 +5094,7 @@ bool user_interface::handle_functions(int key)
record(user_interface,
"Handle function for key %d (plane %d) ", key, shift_plane());
- if (object_p obj = object_for_key(key))
+ if (object_p obj = object_for_key(key,shift_plane(),alpha_plane()))
return handle_functions(key, obj, false);
return false;
}
@@ -5718,7 +5228,7 @@ bool user_interface::handle_functions(int key, object_p objp, bool user)
[[fallthrough]];
default:
- if (validate_input)
+ if (validate_input)
goto insert_object;
// If we have the editor open, need to close it
@@ -5819,13 +5329,11 @@ bool user_interface::current_word(utf8 &start, size_t &size)
}
-
// ============================================================================
//
// User interface commands, which can be invoked from keymap
//
// ============================================================================
-
bool user_interface::do_edit()
// ----------------------------------------------------------------------------
// Edit lowest-level on the stack
@@ -5895,6 +5403,13 @@ bool user_interface::do_exit()
dirtyEditor = true;
dirtyStack = true;
}
+ else
+ {
+ alpha = false;
+ lowercase = false;
+ if (Settings.ExitClearsMenu())
+ clear_menu();
+ }
}
return true;
}
@@ -5998,24 +5513,34 @@ bool user_interface::do_down()
bool user_interface::do_delete(bool forward)
// ----------------------------------------------------------------------------
-// Delete what is right of cursor
+// Search: reduce selection by one element right/left
+// no selection: Delete what is right/left of cursor
+// selection: delete selection
// ----------------------------------------------------------------------------
{
- if (~searching)
+ if (~searching)
{
utf8 ed = rt.editor();
- if (cursor > select)
- cursor = utf8_previous(ed, cursor);
- else if (~select)
- select = utf8_previous(ed, select);
- if (cursor == select)
- cursor = select = searching;
+ if (forward)
+ {
+ if (cursor < select)
+ cursor = utf8_next(ed, cursor);
+ else if (cursor > select)
+ select = utf8_next(ed, select);
+ }
else
- do_search(0, true);
+ {
+ if (cursor > select)
+ cursor = utf8_previous(ed, cursor);
+ else if (cursor < select)
+ select = utf8_previous(ed, select);
+
+ }
+ dirtyEditor = true;
}
else
{
- utf8 ed = rt.editor();
+ utf8 ed = rt.editor();
size_t edlen = rt.editing();
if (~select && select != cursor)
@@ -6069,22 +5594,32 @@ bool user_interface::do_delete(bool forward)
return true;
}
+bool user_interface::do_new_line()
+// ----------------------------------------------------------------------------
+// Insert New Line
+// ----------------------------------------------------------------------------
+{
+ insert('\n', DIRECT);
+ edRows = 0;
+ return true;
+}
+
bool user_interface::do_algebraic()
// ----------------------------------------------------------------------------
// Magic key to enter algebraic objects
// ----------------------------------------------------------------------------
{
- bool editing = rt.editing();
- if (!editing || mode != BASED)
- {
- bool is_eqn = editing && is_algebraic(mode);
+
+
+
+ bool is_eqn = rt.editing() && is_algebraic(mode);
insert(is_eqn ? '(' : '\'', ALGEBRAIC);
last = 0;
return true;
- }
- return false;
-}
+ }
+
+
bool user_interface::do_text()
@@ -6094,11 +5629,278 @@ bool user_interface::do_text()
{
// Insert quotes and begin editing
insert('\"', TEXT);
- alpha = true;
+ if (!lowercase) alpha = true;
return true;
}
+bool user_interface::editing_chs()
+// ----------------------------------------------------------------------------
+// Magic key to change sign +/- (editing)
+// ----------------------------------------------------------------------------
+{
+ if (rt.editing())
+ {
+ // Special case for change of sign
+ byte *ed = rt.editor();
+ byte *p = ed + cursor;
+ utf8 found = nullptr;
+ unicode c = utf8_codepoint(p);
+ unicode dm = Settings.DecimalSeparator();
+ unicode ns = Settings.NumberSeparator();
+ unicode hs = Settings.BasedSeparator();
+ bool had_complex = false;
+ while (p > ed && !found)
+ {
+ p = (byte *) utf8_previous(p);
+ c = utf8_codepoint(p);
+ if (c == complex::I_MARK || c == complex::ANGLE_MARK)
+ {
+ had_complex = true;
+ if (c == complex::ANGLE_MARK)
+ {
+ found = utf8_next(p);
+ }
+ else
+ {
+ found = p;
+ p = (byte *) utf8_previous(p);
+ c = utf8_codepoint(p);
+ }
+ }
+ else if ((c < '0' || c > '9') && c != dm && c != ns && c != hs)
+ {
+ found = utf8_next(p);
+ }
+ }
+
+ if (!found)
+ found = ed;
+ if (c == 'e' || c == 'E' || c == Settings.ExponentSeparator())
+ c = utf8_codepoint(p);
+ if (c == '+' || c == '-')
+ *p = '+' + '-' - c;
+ else
+ insert(found - ed, '-');
+ last = 0;
+ dirtyEditor = true;
+ return true;
+ }
+ return false;
+}
+
+
+bool user_interface::editing_eex_or_cycle_prefixes()
+// ----------------------------------------------------------------------------
+// Magic key to EEX enter exponent or cycle trough SI prefixes (units)
+// ----------------------------------------------------------------------------
+{
+ if (rt.editing())
+ {
+ if (mode == UNIT)
+ {
+ utf8 start = nullptr;
+ size_t len = 0;
+ if (current_word(start, len))
+ {
+ byte *ed = rt.editor();
+ byte *st = (byte *) start;
+ bool ins = true;
+ bool del = false;
+ utf8 cycle = utf8("kcmμMGTpn"); // Default cycle
+ size_t cylen = strlen(cstring(cycle));
+ if (object_p name = unit::si_prefixes_variable())
+ if (object_p si = directory::recall_all(name, false))
+ if (text_p txt = si->as())
+ cycle = txt->value(&cylen);
+
+ if (len == 3 && st[1] == 'm' && st[2] == 's')
+ {
+ if (st[0] == 'd' || st[0] == 'h')
+ {
+ cylen = 0;
+ st[0] = st[0] == 'd' ? 'h' : 'd';
+ }
+ }
+
+ if (cylen)
+ {
+ unicode prefix = utf8_codepoint(cycle);
+ size_t toremove = 1;
+ if (len > 1)
+ {
+ unicode existing = utf8_codepoint(st);
+ utf8 cyend = cycle + cylen;
+ ins = true;
+ while (cycle < cyend)
+ {
+ utf8 ncycle = utf8_next(cycle);
+ if (existing == utf8_codepoint(cycle))
+ {
+ if (ncycle < cyend)
+ prefix = utf8_codepoint(ncycle);
+ else
+ del = true;
+ toremove = utf8_size(existing);
+ ins = false;
+ break;
+ }
+ cycle = ncycle;
+ }
+ }
+ if (del &&
+ size_t(st - ed + 1) < rt.editing() &&
+ is_valid_in_name(start))
+ {
+ remove(st - ed, toremove);
+ }
+ else
+ {
+ if (!ins && (size_t(st - ed + 1) >= rt.editing() ||
+ !is_valid_in_name(start)))
+ {
+ ins = true;
+ prefix = utf8_codepoint(cycle);
+ }
+ if (ins)
+ {
+ insert(st - ed, prefix);
+ }
+ else
+ {
+ remove(st - ed, toremove);
+ insert(st - ed, prefix);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+
+ // Special case for EEX
+ byte *ed = rt.editor();
+ byte *p = ed + cursor;
+ byte cursor_move = 0;
+ bool firstN = false;
+ bool firstS = false;
+ bool secondN = false;
+ bool secondS = false;
+ bool thirdN = false;
+ bool thirdS = false;
+ bool found = false;
+ unicode c = utf8_codepoint(p);
+ unicode dm = Settings.DecimalSeparator();
+ unicode ns = Settings.NumberSeparator();
+ unicode hs = Settings.BasedSeparator();
+ // E --> use old E criteria: 1=0,2=0,3=0
+ // E- --> use old E criteria: 1=S,2=0,3=0
+ // E8 --> use old E criteria: 1=N,2=0,3=0
+ // E-8 --> use old E criteria: 1=N,2=S,3=0
+ // E8- --> new E criteria: 1=S,2=N,3=0
+ // E-8- --> new E criteria: 1=S,2=N,3=S
+ // E8-7 --> new E criteria: 1=N,2=S,3=N
+ // E8-7 --> new E criteria: 1=N,2=S,3=N
+ while (p > ed)
+ {
+ p = (byte *) utf8_previous(p);
+ c = utf8_codepoint(p);
+ if (c== '-' || c=='+')
+ {
+ if (!firstN && !firstS) firstS=true;
+ if (firstN) secondS=true;
+ if (secondN) thirdS=true;
+ cursor_move++;
+ continue;
+ }
+ if ((c >= '0' && c <= '9') || c == dm || c == ns || c == hs)
+ {
+ if (!firstN && !firstS) firstN=true;
+ if (firstS) secondN=true;
+ if (secondS) thirdN=true;
+ cursor_move++;
+ continue;
+ }
+ if (c == 'e' || c == 'E' || c == Settings.ExponentSeparator())
+ {
+ if ((!firstS && !firstN) || (!secondS && !secondN) || (firstN && secondS && !thirdN && !thirdS))
+ {
+ found = true;
+ beep(2400, 100);
+ for(int i=0;i jump to end of Number, new E: 8.888887E(c)-8
+ // '(c)8.888887E-8 cursor at beginning --> jump to end of Number, use old E: 8.888887E(c)-8
+ if(!found)
+ {
+ cursor_move = 0;
+ p = (byte *) ed + cursor;
+ byte *ende = ed + rt.editing();
+ while(p < ende)
+ {
+ c = utf8_codepoint(p);
+ p = (byte *) utf8_next(p);
+ if ((c >= '0' && c <= '9') || c == dm || c == ns || c == hs)
+ {
+ cursor_move++;
+ cursor = utf8_next(ed, cursor);
+ continue;
+ }
+ if (c == 'e' || c == 'E' || c == Settings.ExponentSeparator())
+ {
+ found = true;
+ cursor = utf8_next(ed, cursor);
+ beep(2400, 100);
+ }
+ break;
+ }
+ }
+ if (!found)
+ {
+ p = (byte *) ed + cursor;
+ p = (byte *) utf8_previous(p);
+ c = utf8_codepoint(p);
+ if (!((c >= '0' && c <= '9') || c == dm || c == ns || c == hs))
+ insert(cursor, utf8("1"), 1);
+ byte buf[4];
+ size_t sz = utf8_encode(Settings.ExponentSeparator(), buf);
+ insert(cursor, buf, sz);
+ }
+ }
+ last = 0;
+ dirtyEditor = true;
+ return true;
+ }
+ return false;
+}
+
+
+bool user_interface::editing_spc_equal_semicolon()
+// ----------------------------------------------------------------------------
+// Magic key to enter space or equal or semicolon
+// ----------------------------------------------------------------------------
+{
+ if (rt.editing())
+ {
+ if (mode == PARENTHESES)
+ insert(';', PARENTHESES);
+ else if (mode == ALGEBRAIC)
+ insert('=', ALGEBRAIC);
+ else
+ insert(' ', PROGRAM);
+ last = 0;
+ dirtyEditor = true;
+ return true;
+ }
+ return false;
+}
+
+
bool user_interface::do_decimal_separator()
// ----------------------------------------------------------------------------
// Behavior of decimal separator key
@@ -6192,13 +5994,11 @@ bool user_interface::do_decimal_separator()
}
-
// ============================================================================
//
// Editor menu commands
//
// ============================================================================
-
bool user_interface::editor_select()
// ----------------------------------------------------------------------------
// Set selection to current cursor position
@@ -6295,6 +6095,7 @@ bool user_interface::editor_word_right()
return true;
}
+
bool user_interface::editor_begin()
// ----------------------------------------------------------------------------
// Move cursor to beginning of buffer
@@ -6377,23 +6178,28 @@ bool user_interface::do_search(unicode with, bool restart)
if (!~select)
select = cursor;
- bool forward = cursor >= select;
+ bool forward = cursor >= select;
size_t selected = forward ? cursor - select : select - cursor;
- if (selected > max)
+ if (selected >= max)
{
selected = 0;
select = cursor;
}
- size_t found = ~0;
+ if ((with == 0) && (selected==0))
+ {
+ edRows = 0;
+ dirtyEditor = true;
+ return false;
+ }
+ size_t found = ~0;
uint ref = forward ? select : cursor;
uint start = restart ? searching : ref;
uint search = start;
-
- // Skip current location (search next) or not (incremental search)
+ // Skip current location (search next) or not (incremental search)
bool skip = with == 0;
// Loop until we either find a new spot or we wrap around
- for (uint count = 0; !~found && count < max; count++)
+ for (uint count = 0; !~found && count <= max; count++)
{
if (skip)
{
@@ -6405,10 +6211,10 @@ bool user_interface::do_search(unicode with, bool restart)
search = 0;
}
else
- {
- search = utf8_previous(ed, search);
+ {
if (search == 0)
- search = utf8_previous(ed, max);
+ search = max;
+ search = utf8_previous(ed, search);
}
}
else
@@ -6443,7 +6249,6 @@ bool user_interface::do_search(unicode with, bool restart)
break;
}
}
-
if (~found)
{
if (with)
@@ -6461,7 +6266,7 @@ bool user_interface::do_search(unicode with, bool restart)
}
edRows = 0;
dirtyEditor = true;
- return true;
+ return true;
}
return false;
}
@@ -6569,6 +6374,7 @@ size_t user_interface::adjust_cursor(size_t offset, size_t len)
return len;
}
+
size_t user_interface::insert(size_t offset, utf8 data, size_t len)
// ----------------------------------------------------------------------------
// Insert data in the editor
diff --git a/src/user_interface.h b/src/user_interface.h
index 81a4d8440..41aedb5f2 100644
--- a/src/user_interface.h
+++ b/src/user_interface.h
@@ -178,7 +178,7 @@ struct user_interface
void clear_shift() { xshift = shift = false; }
void clear_help();
void clear_menu();
- object_p object_for_key(int key);
+ object_p object_for_key(int key, uint plane, uint alpha_plane);
int evaluating_function_key() const;
bool end_edit();
void clear_editor();
@@ -211,6 +211,10 @@ struct user_interface
bool do_up();
bool do_down();
bool do_delete(bool forward);
+ bool do_new_line();
+ bool editing_chs();
+ bool editing_eex_or_cycle_prefixes();
+ bool editing_spc_equal_semicolon();
text_p editor_save(text_r ed, bool rewinding = false);
text_p editor_save(bool rewinding = false);
@@ -242,11 +246,11 @@ struct user_interface
bool handle_help(int &key);
bool handle_editing(int key);
bool handle_editing_command(object::id lower, object::id higher);
- bool handle_alpha(int key);
+ bool handle_search(int key);
bool handle_user(int key);
bool handle_functions(int key);
bool handle_functions(int key, object_p obj, bool user);
- bool handle_digits(int key);
+ bool handle_based(int key);
bool noHelpForKey(int key);
bool do_search(unicode with = 0, bool restart = false);