Bug 216809 - Key Bindings make incorrect output
Summary: Key Bindings make incorrect output
Status: RESOLVED NOT A BUG
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.3.3
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-30 14:39 UTC by shevtsov
Modified: 2012-02-23 02:16 UTC (History)
1 user (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 shevtsov 2009-11-30 14:39:43 UTC
Version:           2.3.3 (using 4.3.3 (KDE 4.3.3), 4.3.3-4.fc12 Fedora)
Compiler:          gcc
OS:                Linux (i686) release 2.6.31.5-127.fc12.i686.PAE

I have a task to implement a SCO Console mode (http://vt100.net/docs/vt510-rm/chapter6)
So, a new key binding list was created, and one line of .keytab is:
key PgDown+Ctrl : "\E[*"
But while pushing Ctrl+PgDown in Test Area, we got a next result:
Input:  PgDown+Ctrl
Output: \E[5
"*" is changed by "5"
Comment 1 Jekyll Wu 2011-11-02 00:51:26 UTC
I do not fully understand that part of code, but it seems an intentional behavior, instead of a bug.

inline QByteArray KeyboardTranslator::Entry::text(bool expandWildCards,Qt::KeyboardModifiers modifiers) const 
{
    QByteArray expandedText = _text;
    
    if (expandWildCards)
    {
        int modifierValue = 1;
        modifierValue += oneOrZero(modifiers & Qt::ShiftModifier);
        modifierValue += oneOrZero(modifiers & Qt::AltModifier)     << 1;
        modifierValue += oneOrZero(modifiers & Qt::ControlModifier) << 2;

        for (int i=0;i<_text.length();i++) 
        {
            if (expandedText[i] == '*')
                expandedText[i] = '0' + modifierValue;
        }
    }

    return expandedText; 
}