Re: [STUMP] Move cursor by character
Dany Haddad <[email protected]>
| Newsgroups | gmane.comp.window-managers.stumpwm.devel |
|---|---|
| Message-ID | <[email protected]> |
Hey David, I've been looking for a generic solution, and I think I've found one that is applicable to most text input fields (whether GTK, Qt, or otherwise). The idea is to move the text-cursor iteratively while expanding the selected area by sending "S-Left" or "S-Right" to the current window. The text currently highlighted is accessible via ~(get-x-selection)~ and thus the text in any input field can be parsed for word boundaries. I've implemented a basic attempt at this here: https://github.com/dmh43/stumpwm-helpers/blob/master/navigation-helpers.lisp It provides only pretty simple functionality, but I typically dont need much more than that outside of my text-editor. Or course, I'm sure there are cases where this solution does not work (for example, in my own emacs config, my solution does not work, but I have a macro which I use to define keybindings for all windows other than emacs windows, so it is ok). Hope this is interesting to someone dmh