[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

incrementor-decrementor commands and bindings (was: finger-pointer curse

From: Drew Adams
Subject: incrementor-decrementor commands and bindings (was: finger-pointer curser as default for mouse-face text)
Date: Tue, 2 Nov 2004 17:27:13 -0800

This is starting to veer off-topic, but FWIW, this follows Stefan's last

This was a main motivation behind my creating function `doremi':

I wanted to have several different incrementing/decrementing commands bound
to "repeatable" key sequences -- that is, chords (e.g. with modifiers) that
can be held down to repeat an action. The number of such chord combinations
is limited, however, and many combinations (e.g. the self-inserting chars,
the arrows) are already taken, so I looked for another approach.

I decided to use just the four arrow keys (and/or the mouse-wheel) for _all_
such commands - easy to use and remember. To do that, I have a non-chord
binding for each incrementor-decrementor command to "start it up"; then the
command itself reads the arrow keys and the mouse-wheel to do its job.

For instance, I have these command bindings:

C-x t c  doremi-bg-rgb - change frame background color incrementally
C-x t z  doremi-font-size - zoom: change frame font size incrementally
C-x t w  doremi-frame-width - change frame width incrementally
C-x t h  doremi-frame-height - change frame height incrementally
C-x t x  doremi-frame-horizontally - move frame left/right incrementally
C-x t y  doremi-frame-vertically - move frame up/down incrementally
C-x t b  doremi-buffers - successively cycle among existing buffers
C-x t m  doremi-bookmarks - successively cycle among bookmarks
C-x t t  doremi-color-themes - successively cycle among color themes
C-x t f  doremi-font - successively cycle among fonts, choosing by name
C-x t u  doremi-frame-configs - undo: cycle among recorded frame configs
C-x t .  save-frame-config - add current frame config to the cycle for `C-x
t u'

[ Actually only one of the `C-x t' bindings `w' and `h' is needed. Likewise,
only one of `x' and `y' really needs to be bound. Each of these commands
lets you use all _four_ arrow keys and/or the mouse-wheel to move the frame
in any direction or change any of its dimensions. So, for instance, a single
binding lets you increment and decrement the frame width and frame height.
It's like having 4 (+2 for the wheel) bindings in one. ]

These particular incrementor-decrementor commands might not seem that
interesting, but you might be able to imagine others that you would find
useful. The point is that if each such command had to use a different pair
of key bindings that let you continually hold the keys pressed, you would
soon run out of chord combinations, and you would in any case have
difficulty remembering them all.

Eventually, BTW, I'd like to see users be able (as an option) to use such
incrementor-decrementor commands to change appropriate settings on Customize
pages (you see the change as its made; you can undo it if you like). This is
not appropriate for all settings, by any means, but for some kinds of
settings it could be useful. An example might be changing the default frame
background color a la `doremi-bg-rgb'. The idea is to move more toward
direct manipulation in the UI.

 - Drew

-----Original Message-----From: Stefan

BTW, C-+ is OK because it's currently unused, but C-- is already bound and
I've been known to use it, so otherpeople might use it as well.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]