diff --git a/docs/index.html b/docs/index.html
index 969d3a084..0ac22e5dd 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1364,8 +1364,8 @@
Toggle windowed/fullscreen mode |
- Alt + Enter |
- Cmd + Enter |
+ Alt + Return |
+ Cmd + Return |
Toggle adapting display refresh rate to game frame rate
@@ -1757,11 +1757,6 @@
| Backspace |
Backspace |
-
- Go to parent directory (UI mode) |
- Backspace |
- Backspace |
-
Decrease emulation speed (disables 'Turbo' mode) |
Shift-Control + s |
@@ -1867,8 +1862,129 @@
+ UI Keys (can be remapped)
+
+
+
+ Function |
+ Key (Standard) |
+ Key (macOS) |
+
+
+ Move Up |
+ Up arrow |
+ Up arrow |
+
+
+ Move Down |
+ Down arrow |
+ Down arrow |
+
+
+ Move Left |
+ Left arrow |
+ Left arrow |
+
+
+ Move Right |
+ Right arrow |
+ Right arrow |
+
+
+ Move Home |
+ Home |
+ Home |
+
+
+ Move End |
+ End |
+ End |
+
+
+ Move Page Up |
+ Page Up |
+ Page Up |
+
+
+ Move Page Down |
+ Page Down |
+ Page Down |
+
+
+ OK |
+ - |
+ - |
+
+
+ Cancel |
+ Escape |
+ Escape |
+
+
+ Select item |
+ Return/Enter/Space |
+ Return/Enter/Space |
+
+
+ Move to previous object |
+ Shift + Tab |
+ Shift + Tab |
+
+
+ Move to next object |
+ Tab |
+ Tab |
+
+
+ Move to previous tab |
+ Shift-Control + Tab |
+ Shift-Control + Tab |
+
+
+ Move to next tab |
+ Control + Tab |
+ Control + Tab |
+
+
+ Go to parent directory |
+ Backspace |
+ Backspace |
+
+
+ Toggle windowed/fullscreen mode |
+ Alt + Return |
+ Cmd + Return |
+
+
+ Exit emulator |
+ Control + q |
+ Cmd + q |
+
+
+
UI Keys in Text Editing areas (cannot be remapped)
+ *** TODO!!! ***
+
+
+
+ Function |
+ Key (Standard) |
+ Key (macOS) |
+
+
+ Move cursor to beginning of line |
+ Home, Control + a |
+ Home, Control + a |
+
+
+ ... |
+ ... |
+ ... |
+
+
+
+
Key | Editor Function |
Home, Control + a | Move cursor to beginning of line |
@@ -1884,6 +2000,7 @@
Control + v, Shift + Insert | Paste clipboard contents |
Control + x, Shift + Delete | Cut entire line to clipboard |
+
diff --git a/src/gui/EditableWidget.cxx b/src/gui/EditableWidget.cxx
index e5808ece8..f58da8c7f 100644
--- a/src/gui/EditableWidget.cxx
+++ b/src/gui/EditableWidget.cxx
@@ -187,6 +187,10 @@ bool EditableWidget::handleControlKeys(StellaKey key, StellaMod mod)
sendCommand(EditableWidget::kChangedCmd, key, _id);
break;
+ case KBDK_Z:
+ // TODO: undo
+ break;
+
case KBDK_LEFT:
handled = moveWord(-1, shift);
if(!shift)
@@ -700,10 +704,26 @@ bool EditableWidget::pasteSelectedText()
instance().eventHandler().pasteText(pasted);
// remove the currently selected text
killSelectedText();
- // insert paste text instead
- _editString.insert(_caretPos, pasted);
+ // insert filtered paste text instead
+ ostringstream buf;
+ bool lastOk = true; // only one filler char per invalid character (block)
+
+ for(char c : pasted)
+ if(_filter(tolower(c)))
+ {
+ buf << c;
+ lastOk = true;
+ }
+ else
+ {
+ if(lastOk)
+ buf << '_';
+ lastOk = false;
+ }
+
+ _editString.insert(_caretPos, buf.str());
// position cursor at the end of pasted text
- _caretPos += int(pasted.length());
+ _caretPos += int(buf.str().length());
return selected || !pasted.empty();
}