Skip to content

Add Ctrl+key text navigation and editing shortcuts#2400

Open
TheWireLord wants to merge 2 commits intocc-tweaked:mc-1.20.xfrom
TheWireLord:feature/ctrl-key-text-navigation
Open

Add Ctrl+key text navigation and editing shortcuts#2400
TheWireLord wants to merge 2 commits intocc-tweaked:mc-1.20.xfrom
TheWireLord:feature/ctrl-key-text-navigation

Conversation

@TheWireLord
Copy link
Copy Markdown
Contributor

Added Ctrl+key combinations for text navigation and editing in both the shell and the edit program.

Shell (bios.lua):

  • Ctrl+Left/Right: Navigate by words
  • Ctrl+Backspace: Delete word to the left
  • Ctrl+Delete: Delete word to the right

Text Editor (edit.lua):

  • Ctrl+Left/Right: Navigate by words
  • Ctrl+Backspace: Delete word to the left
  • Ctrl+Delete: Delete word to the right
  • Ctrl+Home: Jump to beginning of file
  • Ctrl+End: Jump to end of file
  • Smart menu behavior: Ctrl combos don't interfere with menu system

Added Ctrl+key combinations for text navigation and editing in both the shell and the edit program.

**Shell (bios.lua):**
- Ctrl+Left/Right: Navigate by words
- Ctrl+Backspace: Delete word to the left
- Ctrl+Delete: Delete word to the right

**Text Editor (edit.lua):**
- Ctrl+Left/Right: Navigate by words
- Ctrl+Backspace: Delete word to the left
- Ctrl+Delete: Delete word to the right
- Ctrl+Home: Jump to beginning of file
- Ctrl+End: Jump to end of file
- Smart menu behavior: Ctrl combos don't interfere with menu system
@Wojbie
Copy link
Copy Markdown
Contributor

Wojbie commented Mar 20, 2026

You appear to be storing if ctrl was pressed as a flag, have you tested how this code would act if someone (or multiple players) were to press both/multiple ctrl keys and released one? Also would require to check how this changes would interact with AltGr key presses, as that one is treated as alt+ctrl in some keyboard layouts/languages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants