From 6a52923f7090f947cef15f9f42b622ef34d73722 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Wed, 24 Nov 2021 14:09:53 +0200 Subject: InputWidget: Ctrl+A to select all (on PC) The Emacs-style Ctrl+A and Ctrl+E are only available on macOS now. This could still use a keybinding for customizing the behavior. --- src/ui/inputwidget.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index 6c84b161..301fd220 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c @@ -2161,11 +2161,7 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) { refresh_Widget(w); return iTrue; case SDLK_a: -#if defined (iPlatformApple) if (mods == KMOD_PRIMARY) { -#else - if (mods == (KMOD_PRIMARY | KMOD_SHIFT)) { -#endif selectAll_InputWidget(d); d->mark.start = 0; d->mark.end = cursorToIndex_InputWidget_(d, curMax); @@ -2174,6 +2170,7 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) { refresh_Widget(w); return iTrue; } +#if defined (iPlatformApple) /* fall through for Emacs-style Home/End */ case SDLK_e: if (mods == KMOD_CTRL || mods == (KMOD_CTRL | KMOD_SHIFT)) { @@ -2182,6 +2179,7 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) { return iTrue; } break; +#endif case SDLK_LEFT: case SDLK_RIGHT: { const int dir = (key == SDLK_LEFT ? -1 : +1); -- cgit v1.2.3