Bug 329065 - Ctrl+Backspace shortcut breaks after Konsole restart
Summary: Ctrl+Backspace shortcut breaks after Konsole restart
Status: RESOLVED NOT A BUG
Alias: None
Product: konsole
Classification: Applications
Component: keyboard (show other bugs)
Version: unspecified
Platform: Windows CE Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-21 07:22 UTC by Max
Modified: 2018-03-04 19:34 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max 2013-12-21 07:22:41 UTC
If I set a keyboard shortcut with the keystroke "Ctrl+Backspace", it works until I quit Konsole. When I reopen Konsole, the keystroke no longer works and the shortcuts menu lists it as "Backspace+Ctrl".

Reproducible: Always

Steps to Reproduce:
1. Settings -> Configure current profile... -> Input -> Edit
2. Click "Add" and press Ctrl+Backspace in the input field. The output is insignificant.
3. Close the dialogs and observe that the shortcut works.
4. Restart Konsole.
Actual Results:  
After restarting Konsole, the shortcut stops working.

Expected Results:  
The shortcut keeps working regardless of Konsole restarts.
Comment 1 Kurt Hindenburg 2014-01-04 16:17:08 UTC
Confirmed - following steps produces the bad results
Comment 2 Kurt Hindenburg 2014-01-04 17:30:20 UTC
The swapping of the keystroke is normal - it appears after a  restart, the Backspace+Ctrl goes back to the 'normal' of deleting characters on the command line
Comment 3 Ahmad Samir 2018-03-04 19:34:46 UTC
This is the expected behaviour (quirky, yes, but expected), from https://cgit.kde.org/konsole.git/tree/data/keyboard-layouts/README.KeyTab#n42:
--------------
  Note that the combination of Key and Modes (set/reset)
  has to be unique. This means, that

    key A + Shift : "A"
    key A : "a"

  will not accept the small letter "a" rule as expected,
  one has to add a "- Shift" to the last clause. Use
  the stdout/stderr dianostics of konsole when modifying
  keytabs to find problems like this.
---------------

So the problem here is:
Backspace sends \x7f
Backspace+Ctrl is added to send e.g. another escape sequence

(TL;DR: the latter works the first time because it's technically applied _after_ the Backspace rule, but then it doesn't work after restarting because in the saved .keytab file Backspace+Ctrl comes _before_ Backspace).

So this should work:
Backspace-AnyModifier \x7f or (Backspace-Ctrl if you want to make it specific)
Backspace+Ctrl         \b

or whatever you want Backspace+Ctrl to do.

The default.keytab has been changed in git recently with the above rules, so this shouldn't be an issue any more going forward.

Closing as invalid since, IIUC, that's the way the keyboardTranslator code in konsole is supposed to work. :)