Bug 170220 - VT420 keypad support abysmal
Summary: VT420 keypad support abysmal
Status: RESOLVED NOT A BUG
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-02 00:33 UTC by Roland
Modified: 2009-02-22 20:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roland 2008-09-02 00:33:20 UTC
Version:           2.0 (using KDE 4.0.5)
OS:                Linux
Installed from:    Ubuntu Packages

The Keypad mapping simply isn't robust enough to handle any VT keypad functionality correctly.  When you are logged into an actual OpenVMS box and in EDT, LSE, EVE, TPU or one of the other keypad oriented editors, the keypad needs to be in Application Mode.  There is an escape sequence which comes to the terminal to tell it to send application codes instead of normal codes.  See this link for the actual escape sequence mapping:  http://www.cs.utk.edu/~shuford/terminal/msvibm_vt.txt

Konsole shows a lot of promise and I would LOVE to use it instead of Xterm when working with OpenVMS, but you HAVE to have a two level keymap table and actually have the correct mappings set up.  Don't forget, NumLock needs to be GOLD which is \E[P.  ScrollLock needs to map to the DO key not ScrollLock because on a real VT keyboard F1 is the scroll lock.
Comment 1 Robert Knight 2008-09-22 00:53:09 UTC
Hello,

If you are referring to this escape sequence: http://vt100.net/docs/vt510-rm/DECCKM, then Konsole does support it.  

You can see the different key sequences that Konsole will send by using the key binding editor (Settings -> Edit Current Profile -> Input -> (Select 'DEC VT420 Terminal') -> Edit).  Those entries with "+AppCuKeys" in the Key Combination field are triggered when cursor sequences are enabled and those with "-AppCuKeys" are triggered when cursor sequences are disabled.  Currently the Test Area in the dialog has cursor sequences disabled and there isn't a checkbox to change this.

Being the youngster that I am, I don't know anything about OpenVMS so you'll have to have a look at the key bindings editor and tell me if it does what you want.
Comment 2 Robert Knight 2008-09-23 11:19:15 UTC
Removed VT420 keyboard binding as it apparently does not work and I have no test suite for it.
Comment 3 Robert Knight 2009-02-13 17:20:05 UTC
SVN commit 925604 by knight:

Disable application keypad support in the default key bindings file as, although it
produces the correct key codes as tested using 'vttest', it breaks Vim - which
enables application key pad by default.

BUG:183076
CCBUG:170220



 M  +18 -15    default.keytab  


WebSVN link: http://websvn.kde.org/?view=rev&revision=925604
Comment 4 Roland 2009-02-21 23:39:21 UTC
Hello Robert,

It has been a long time since we chatted.  I have been swamped with client projects and getting a novel out.  No time to be of assistance.  Took a break today from negotiating with eBook retailers and service centers to take a quick look at this.  I'm running 64-bit Ubuntu 8.10 with all patches applied as of today.  Konsole says it is Version 2.2 running on KDE 4.2.00.

A couple of the values which were in xfree were wrong.  I fixed them in this vt420 file.

keyboard "DEC VT420 Terminal"                                      
key Space+Ctrl : ""                                                
key *+KeyPad+AppKeypad : "\EOR"                                    
key ++KeyPad+AppKeypad : "\EOl"                                    
key -+KeyPad+AppKeypad : "\EOS"                                    
key Esc : "\E"                                                     
key .+KeyPad+AppKeypad : "\EOn"                                    
key Tab : "\t"                                                     
key Backtab : "\E[Z"                                               
key 0+KeyPad+AppKeypad : "\EOp"                                    
key Backspace : "\x7f"                                             
key 1+KeyPad+AppKeypad : "\EOq"                                    
key Return-NewLine : "\r"                                          
key Return+NewLine : "\r\n"                                        
key 2+KeyPad+AppKeypad : "\EOr"                                    
key Enter+KeyPad+AppKeypad : "\EOM"                                
key Enter+NewLine : "\r\n"                                         
key Enter-NewLine : "\r"                                           
key 3+KeyPad+AppKeypad : "\EOs"                                    
key Ins-Shift : "\E[2~"                                            
key 4+KeyPad+AppKeypad : "\EOt"                                    
key Del : "\x7f"                                                   
key 5+KeyPad+AppKeypad : "\EOu"                                    
key 6+KeyPad+AppKeypad : "\EOv"                                    
key 7+KeyPad+AppKeypad : "\EOw"                                    
key 8+KeyPad+AppKeypad : "\EOx"                                    
key 9+KeyPad+AppKeypad : "\EOy"                                    
key Home : "\E[H"                                                  
key End : "\E[F"                                                   
key Left-Shift-Ansi : "\ED"                                        
key Left-Shift+Ansi+AppCursorKeys : "\EOD"                         
key Left-Shift+Ansi-AppCursorKeys : "\E[D"                         
key Up-Shift-Ansi : "\EA"                                          
key Up-Shift+Ansi+AppCursorKeys : "\EOA"                           
key Up-Shift+Ansi-AppCursorKeys : "\E[A"                           
key Up+Shift : ScrollLineUp                                        
key Right-Shift-Ansi : "\EC"                                       
key Right-Shift+Ansi+AppCursorKeys : "\EOC"
key Right-Shift+Ansi-AppCursorKeys : "\E[C"
key Down-Shift-Ansi : "\EB"
key Down-Shift+Ansi+AppCursorKeys : "\EOB"
key Down-Shift+Ansi-AppCursorKeys : "\E[B"
key Down+Shift : ScrollLineDown
key PgUp-Shift : "\E[5~"
key PgUp+Shift : ScrollPageUp
key PgDown-Shift : "\E[6~"
key PgDown+Shift : ScrollPageDown
key ScrollLock : ScrollLock
key F1-Shift : "\E[11~"
key F1+Shift : "\E[11;2~"
key F2-Shift : "\E[12~"
key F2+Shift : "\E[12;2~"
key F3-Shift : "\E[13~"
key F3+Shift : "\E[13;2~"
key F4-Shift : "\E[14~"
key F4+Shift : "\E[14;2~"
key F5-Shift : "\E[15~"
key F5+Shift : "\E[15;2~"
key F6-Shift : "\E[17~"
key F6+Shift : "\E[17;2~"
key F7-Shift : "\E[18~"
key F7+Shift : "\E[18;2~"
key F8-Shift : "\E[19~"
key F8+Shift : "\E[19;2~"
key F9-Shift : "\E[20~"
key F9+Shift : "\E[20;2~"
key F10-Shift : "\E[21~"
key F10+Shift : "\E[21;2~"
key F11-Shift : "\E[23~"
key F11+Shift : "\E[23;2~"
key F12-Shift : "\E[24~"
key F12+Shift : "\E[24;2~"


You're getting pretty close.  Here are the issues I was able to identify running telnet into my OpenVMS Alpha.

NumLock  (Gold) only works the first time.  Either I have the entry luggied up in this file, or the path through the code is both sending the sequence AND toggling to keypad mode.  Not good if it has been remapped.

No matter what I did in the entry GUI, I could not map  /+KeyPad+AppKeypad to be \EOQ.  Kept getting a blank row.  Don't know if this is stupidity on my part or a bug with the GUI component's parser.

If the current build has fixed either of these two issues then please let me know.  I will try to find the time this coming week to pull it down and run a build.
Comment 5 Robert Knight 2009-02-22 13:38:33 UTC
> If the current build has fixed either of these two issues
> then please let me know.

I haven't touched this code since the release, except to remove all AppKeyPad entries from the default key bindings file (for the VT102 terminal) since they break Vim.
Comment 6 Roland 2009-02-22 20:03:52 UTC
Well, there are only two bugs in the code now.

1)  When NumLock is mapped in the table it shouldn't be allowed to toggle between keypad and nokeypad modes.

2)  The mapping doesn't allow a person to map the / key, at least in any manner I could find.

Once those are fixed it should be good to go...assuming a person uses the mapping I provided.  The mappings which were in the other file were incorrect.