diff options
| -rw-r--r-- | doc/editing_keys.txt | 47 | ||||
| -rw-r--r-- | src/edbox.c | 5 |
2 files changed, 33 insertions, 19 deletions
diff --git a/doc/editing_keys.txt b/doc/editing_keys.txt index ab4a022..83c64b5 100644 --- a/doc/editing_keys.txt +++ b/doc/editing_keys.txt @@ -1,5 +1,12 @@ This is kind of a weird mix of UNIX/Emacs/bash and traditional Atari. +ASCII characters: + +Shift-Escape - backtick: ` +Ctrl-Escape - tilde: ~ +Ctrl-comma - left curly brace: { +Ctrl-period - right curly brace: } + Cursor movement: Left/Right arrows - move cursor left/right @@ -7,35 +14,39 @@ Up arrow - if the inputbox has anything in it, move up 1 line, aka 40 characters, or to the start if the text is less than 40 characters. Up arrow *in an empty inputbox* - bring up last entered command. - Can coexist with regular use of Up for movement. + If this doesn't seem to work, make sure your input box really is + empty (spaces are invisible, but count as "not empty"). If in + doubt, press Shift-Del. Down arrow - moves down 1 line, aka 40 characters. If this would move past the end of the text, moves to the end. -Ctrl-A - move to start of buffer -Ctrl-E - move to end of buffer -Ctrl-F or ctrl-shift-Up - move right by one word. -Ctrl-B or ctrl-shift-Down - move left by one word. +Ctrl-A - Move to start of buffer. +Ctrl-E - Move to end of buffer. +Ctrl-F or Ctrl-Shift-Up - move right by one word. +Ctrl-B or Ctrl-Shift-Down - move left by one word. Deleting text: -Backspace - delete the character to the left of the cursor -Shift-Del - delete (clear) buffer -Shift-Clear or Ctrl-Clear: clear buffer and hide input box (show status) -Ctrl-Del or Ctrl-X - delete the character under the cursor -Ctrl-U - delete to start of buffer. -Ctrl-W - delete word to left of cursor -Ctrl-U - delete to start of buffer -Ctrl-K - kill (delete) to end of buffer. +Backspace - Delete the character to the left of the cursor. +Shift-Del - Delete (clear) buffer. +Shift-Clear or Ctrl-Clear: clear buffer and hide input box (show status). +Ctrl-Del or Ctrl-X - delete the character under the cursor. +Ctrl-U - Delete to start of buffer. +Ctrl-W - Delete word to left of cursor +Ctrl-U - Delete to start of buffer +Ctrl-K - Kill (delete) to end of buffer. Formatting: -Ctrl-I - toggle italic (prints as down-arrow) -Ctrl-shift-U - toggle underline (prints as right-arrow) -Atari/inverse key - toggle bold (prints as inverse B) +Atari/inverse key - Toggle bold (prints as inverse B) +Ctrl-I - Toggle italic (prints as down-arrow) +Ctrl-shift-U - Toggle underline (prints as right-arrow) Other: -Tab - Nick completion (only at the start of an empty input box!) -Ctrl-Insert - toggle insert/typeover +Tab - Nick/channel completion (only at the start of an empty input box!) +Ctrl-Insert - Toggle insert/typeover. +Escape - Treats next keystroke as though Start were held down. + Pressing Escape again gets out of this mode. Future plans: diff --git a/src/edbox.c b/src/edbox.c index ad04140..1429c8c 100644 --- a/src/edbox.c +++ b/src/edbox.c @@ -104,7 +104,10 @@ static void del_to_end(void) { static void backspace(void) { if(!edbox_pos) return; edbox_pos--; - del_char(); + if(typeover) + edit_box[edbox_pos] = ' '; + else + del_char(); } static void up(void) { |
