diff options
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -62,6 +62,20 @@ void editor_process_keypress(struct editor_state *editor, SDL_Keysym *keysym) case SDLK_i: editor->mode = EDITOR_MODE_INSERT; break; + case SDLK_a: + if (keysym->mod & KMOD_SHIFT) + editor->cursor_x = editor->rows[editor->cursor_y].size; + else + editor_move_right(editor); + editor->mode = EDITOR_MODE_INSERT; + break; + case SDLK_o: + if (keysym->mod & KMOD_SHIFT) + editor_add_line_above(editor); + else + editor_add_line_below(editor); + editor->mode = EDITOR_MODE_INSERT; + break; case SDLK_k: editor_move_up(editor); break; |