[Konsole-devel] [Bug 59256] selection with shift + arrow keys in midnight commander

Gary Cramblitt garycramblitt at comcast.net
Thu Oct 2 04:03:49 UTC 2003


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=59256     




------- Additional Comments From garycramblitt at comcast.net  2003-10-02 06:03 -------
The problem is that konsole is using the shifted arrow keys for other functions.
 For example, <Shift-Up> and <Shift-Down> are used to scroll the konsole
history.  <Shift-Right> and <Shift-Left> are used to switch sessions.  To solve
this problem, do the following:

1.  Go to KDE Control Center | Keyboard Shortcuts and make sure these keys are
not assigned as shortcuts.

2.  Copy /usr/share/apps/konsole/default.Keytab to
~/.kde/share/apps/konsole/mytab.keytab

3.  Edit mytab.keytab.  Change the "Keyboard" line to something like

keyboard "XTerm (mytab)"

Add the following lines below the cursor keys section.

# shifted cursor keys
key Up    +Shift   : "\EO2A"
key Down  +Shift   : "\EO2B"
key Right +Shift   : "\EO2C"
key Left  +Shift   : "\EO2D"

Comment out (add #) the following two lines.

# key Up    +Shift   : scrollLineUp
# key Down  +Shift   : scrollLineDown

4.  Close and restart konsole.  In konsole menu, choose "Settings | Keyboard |
XTerm (mytab)".

You should now be able to select using arrow keys in Midnight Commander.

Note that you cannot scroll up/down one line at a time in konsole history
anymore, but <Shift-PgUp> and <Shift-PgDn> still work.

This fix also allows shifted selection in non-GUI vim and non-GUI emacs.  You
may have to do some mappings in the .vimrc or .emacs files to get it working.

Note that the above fixes work on my RedHat 9 KDE 3.1 system.  Your mileage may
vary.

Developers, an enhancement to konsole is needed that would permit Shift arrows
to change sessions and scroll history, but still send escape sequences when a
full-screen curses app (such as MC, non-GUI vim, non-GUI emacs) is running.  The
current design of the keytab files does not permit this.  Something like

# shifted cursor keys
key Up    +Shift   : "\EO2A"
key Down  +Shift   : "\EO2B"
key Right +Shift   : "\EO2C"
key Left  +Shift   : "\EO2D"
scrollLineUp       : Up    +Shift
scrollLineDown     : Down  +Shift

would allow the shifted Up/Down keys to work in two different modes. 
Determining which mode is the problem, of course.  Perhaps a custom terminal
initialization escape sequence?

Gary Cramblitt


More information about the konsole-devel mailing list