diff options
author | P. J. McDermott <pj@pehjota.net> | 2021-08-06 19:23:27 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2021-08-06 19:23:27 (EDT) |
commit | 4d2e2ec59b52e1a085313fcb823e7b2393137d1f (patch) | |
tree | 9a123305add09f610721f9bc08503d2ebb3165a9 | |
parent | 05aac4b1dd03e95049cf134c8f64c31312f2f9e5 (diff) | |
download | mazefight-4d2e2ec59b52e1a085313fcb823e7b2393137d1f.zip mazefight-4d2e2ec59b52e1a085313fcb823e7b2393137d1f.tar.gz mazefight-4d2e2ec59b52e1a085313fcb823e7b2393137d1f.tar.bz2 |
tk: Handle Home and End keys in text widget
-rw-r--r-- | src/tk/text.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tk/text.c b/src/tk/text.c index e5ae0b1..2a77691 100644 --- a/src/tk/text.c +++ b/src/tk/text.c @@ -81,6 +81,12 @@ _mftk_text_key_event(struct mftk_widget *w, SDL_Event *e) t->cur = len; } break; + case SDLK_HOME: + t->cur = 0; + break; + case SDLK_END: + t->cur = strlen(t->val); + break; default: break; } |