summaryrefslogtreecommitdiff
path: root/src/input.c
AgeCommit message (Collapse)Author
2023-01-22Add page up & page down keybindings.Phil Jones
2022-12-21Add text cursor support.Phil Jones
This turned out to be much more complex than anticipated, and the potential for bugs is therefore quite high.
2022-11-28Refactor string vector code.Phil Jones
Previously, string vectors were built by reading input line-by line, and multiple copies of string vectors were made when searching. Now, input is read into one big buffer, and string vectors only contain references to the strings in this buffer. This both speeds up reading of input, and avoids unnecessary copying of strings in various places. The main downside currently is that input read from stdin is no longer UTF-8 normalised. This means, for example, that a search for `e` won't necessarily match `é`. Normalisation is very slow relative to the rest of tofi, however, and not needed for most use-cases. This could either be solved by accepting the slowdown, or making this an option, such as --unicode or --unicode-normalize.
2022-11-19Add missing errno.h include.Phil Jones
2022-11-19Add support for pasting from clipboard.Phil Jones
2022-11-01Add alternative key binding to delete a word.Maksim
2022-10-23Synchronise rendering with surface update.Phil Jones
This fixes an issue where receiving multiple keypresses in the time taken to draw a frame could cause input to be out of sync with the display.
2022-10-23Replace wchar and friends with Unicode handling.Phil Jones
All text handling should now be explicitly UTF-8 or UTF-32, removing the ambiguity around wchar_t and related functions.
2022-10-21Initial input handling cleanup.Phil Jones
Also changed keyboard shortcuts to use physical keycodes, rather than XKB keysyms. This means shortcuts don't shift when keyboard layout is changed.