Bug 60281 - inconsistent ui: ctrl+arrow should jump between words, not alt+arrow
Summary: inconsistent ui: ctrl+arrow should jump between words, not alt+arrow
Status: RESOLVED WORKSFORME
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-23 18:45 UTC by Georg Wittenburg
Modified: 2006-01-03 20:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
My own keytab file, supporting Ctrl-<Key> (3.63 KB, text/plain)
2004-08-15 12:00 UTC, Martin
Details
Diff to default.keytab (2.05 KB, patch)
2004-08-19 13:06 UTC, Martin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georg Wittenburg 2003-06-23 18:45:27 UTC
Version:            (using KDE KDE 3.1.1)
Installed from:    SuSE RPMs
OS:          Linux

When editing a command line in Konsole, you can only jump between words with alt+{left|right}arrow. This UI is inconsistent to other KDE applications in which ctrl+{left|right}arrow is used for the same thing. 

I think this is a problem in Konsole rather than bash as it works fine when using xterm. ctrl+{left|right}arrow does nothing in Konsole, so it can be safely added without breaking expected behavior of other users.
Comment 1 Thiago Macieira 2003-06-23 21:28:48 UTC
It's an unimplemented feature. Ctrl+Arrow in Konsole sends the same escape 
code as the arrow key alone. In xterm, it sends a lowercased version of the 
escape sequence. 
 
For reference: 
- for the LeftArrow key, xterm sends 
	ESC[D 
- for Ctrl+LeftArrow (grey keys), xterm sends 
	ESC[d 
- for the numeric keypad, Ctrl or Alt with one the keys generates a completely 
different sequence 
Comment 2 Georg Wittenburg 2004-06-22 13:10:58 UTC
As requested, I confirm that this report is still valid for KDE 3.2.2 (Debian testing/unstable).
Comment 3 Martin 2004-08-15 12:00:03 UTC
Created attachment 7114 [details]
My own keytab file, supporting Ctrl-<Key>
Comment 4 Martin 2004-08-15 12:04:00 UTC
I can confirm this Bug.  The Problem is, that konsole often does not distinguish between Ctrl-<Key> and <Key>.

This can be fixed with a custom key-mapping, placed in ~/.kde/share/apps/konsole/, which can than be chosen from the konsole menu.

I attached my own keytab and a patch between it and the standard keytab.

I would propose to refine the standard keytabs.
Comment 5 Martin 2004-08-19 13:06:20 UTC
Created attachment 7177 [details]
Diff to default.keytab
Comment 6 Georg Wittenburg 2004-12-27 16:34:18 UTC
Just a quick note that this bug hasn't been fixed as of KDE 3.3.2. Maybe next time? :)
Comment 7 Georg Wittenburg 2005-04-03 19:32:17 UTC
Still not implemented in KDE 3.4.
Comment 8 Kurt Hindenburg 2005-04-03 22:11:11 UTC
I'll look at this after 92749 is commited.
Comment 9 Pierre Delagrave 2005-07-12 01:13:34 UTC
bug still not fixed in kde 3.4.1
Why not patch the default default keytab file in the repository?

Thanks
Comment 10 Kurt Hindenburg 2005-07-12 17:50:55 UTC
With the commit of 92749, Konsole now behaves like xterm does.

Ctrl+LeftArrow = 5D
Ctrl+RightArrow = 5C
Alt+LeftArrow = 3D
Alt+RightArrow = 3C
Comment 11 Georg Wittenburg 2005-12-13 02:55:39 UTC
In KDE 3.5, the behaviour of Konsole in fact matches xterm. Thanks!

However, jumping between words now neither works using Alt-<arrow> not Ctrl-<arrow>. I assume that this is not an error in Konsole, but rather in my shell configuration. Any pointers on how to get the desired behaviour, i.e. to use Ctrl+<arrow> to jump between words?
Comment 12 Martin 2005-12-13 10:34:42 UTC
You can configure your shell to match those escape sequences.  Bash uses libreadling, so you should tweak your '~/.inputrc'.  Here is a snippet from mine, which might not work for you out of the box, but you get the idea (see 'man readline'):

----------------------------------------------------------------------
...
#insert space, move back a char: bound to 'Insert'
"":     " \C-b"
#"^[Od": backward-word
#"^[Oc": forward-word
#"^[[D": backward-word
#"^[[C": forward-word

#
# Fix Home and End for German users
#
$if term=xterm
"\e[7~":   beginning-of-line
"\e[8~":   end-of-line
"\e[1;5D": backward-word
"\e[1;5C": forward-word
$endif
----------------------------------------------------------------------
Comment 13 Martin 2005-12-13 10:35:44 UTC
sorry for the typo, it is 'libreadline' and not 'libreadling' of course
Comment 14 Georg Wittenburg 2005-12-14 03:18:44 UTC
Thanks for the hint, Martin! I've added the backward-word and forward-word lines to my ~/.inputrc and now Konsole and bash work together like a charm.

As far as I'm concerned, this resolves my bug report.

Regards,
   Georg
Comment 15 Rafal Maj Raf256 2006-01-03 20:36:00 UTC
Why not implement this fix in 3.4?