[Geany] default keybindings, revisited

Nick Treleaven nick.treleaven at xxxxx
Mon Sep 3 11:37:40 UTC 2007


On 09/02/2007 01:06:31 AM, John Gabriele wrote:
> On 8/31/07, Nick Treleaven <nick.treleaven at btinternet.com> wrote:
> > Another idea: keep ctrl-K for delete lines (it's the Emacs binding,
> for
> > one thing, and it's the most common of the 3. Also I think of it as
> > Kill lines...)
> >
> > Then to make cut lines and copy lines more on an equal footing:
> > ctrl-shift-x    cut lines
> > ctrl-shift-c    copy lines
> >
> > At least that would be easy to remember.
> 
> For GUI apps, folks strongly associate Ctrl-{X,C} with {cut,copy}. If
> you want to use the Shift key to "extend" the cut or copy operation, 
> I
> don't think it makes sense to have it deal only specifically with
> lines. Why not words? Or paragraphs?
> 
Well, primarily Geany is a programmer's editor, and IME manipulating 
lines when programming is much more common than words or paragraphs. 
For those things personally I'm used to having to select them first.

> I think there's a temptation to try and associate key combos to every
> feature one can. In this case, unless there's a fair number of users
> who frequently use cut-current-line and copy-current-line regularly, 
> I
> think they could stand to be dropped from the default key bindings.
> Most users will probably instead always just use Shift-Alt-{W,L,P} to
> select the thing they want, then use Ctrl-{X,C}. Or else they'll use
> Shift with the arrow keys, or even ... {gulp} ... the mouse. :)
> 
What else are we going to use Ctrl-Shift-[XC] for? Adding shift should 
mean something relevant to cutting and copying, and to me at least, 
lines seemed a natural extension of that. Scintilla provides default 
bindings for cutting and copying lines (ctrl-l, ctrl-shift-t, IIRC), 
which we've disabled - to me that suggested they were common actions.

> Ctrl-K works well to cut the current line, and I think lots of folks
> are familiar with it, so I think it makes a good default key combo.
> One nice thing you might add to the preferences is to let users
> configure whether Ctrl-K cuts the whole current line, or else cuts
> from the current cursor position to the end of the line (as Emacs
> does). GNU nano has an option like this.
> 
I guess you meant delete, not cut.

Personally, I don't think this is necessary, because we have ctrl-
shift-delete to do that. Also there's a nice symmetry with ctrl-shift-
backspace to delete to the start of the line, and that without shift 
these apply to words, instead of lines.

> Regarding using Ctrl-Alt rather than Shift-Alt: I think it's more
> consistent to use Shift-Alt as the default, since it's analogous to
> using Shift-Ctrl.

I don't see this - surely with Shift-Alt you just swap ctrl for alt, 
and ctrl-alt you swap shift for alt, what's the difference?

> Also, Ctrl-Alt-D and Ctrl-Alt-L would conflict with
> Gnome (as previously mentioned).

This is a problem - not sure what to do about it yet. Perhaps we could 
just avoid those ones, but that would mean reordering some bindings for 
consistency.

> However, for folks using keyboards
> that make Shift-Alt a difficult combo to hit, how about adding an 
> item
> in the Preferences to globally use Ctrl-Alt in place of Shift-Alt?
> 
Well, it seems messy, and the option wouldn't work properly for Gnome.

> Regarding the issue with Ctrl-U and Shift-Ctrl-U: changing the case 
> of
> a selection, though useful, seems like a *relatively* rarely-needed
> feature. IMO, you could drop these two default key bindings, letting
> users reach them via Alt-E F {L,U} -- which is actually pretty
> mnemonic in itself (it reads like "edit format {lower,upper}").
> 
I think most GUI apps avoid sequential keybindings - also some people 
don't like it.

> By the way, as long as we're revisiting keyboard shortcuts, I think 
> it
> makes more sense to use Ctrl-{Up,Down} to go up and down by paragraph
> (instead of Ctrl-[ and Ctrl-], which I just now notice aren't listed
> in the "Help --> Keyboard Shortcuts" dialog).

(That's because they're fixed keybindings.)

> Both combos are easy
> enough to hit, but Ctrl-{Up,Down} seems to make more sense, given 
> what
> Ctrl-{Right,Left} do. Currently, Ctrl-{Up,Down} scroll the window
> by-line which I think is more of a GUI operation that should maybe be
> associated with an Alt-key combo (like Alt-{Up,Down}).
> 
I like that argument ;-)

Regards,
Nick




More information about the Users mailing list