[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [STUMP] Move cursor by character
From: |
Dany Haddad |
Subject: |
Re: [STUMP] Move cursor by character |
Date: |
Thu, 15 Dec 2016 22:35:19 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
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