KpyM Telnet/SSH Server - Forum
New key definitions do not work |
PBig |
New key definitions do not work |
Sep 07 2007 06:22 |
|
I defined some new keys in the utf-8.ini file (Ctrl+Fn - AXEL terminals let you assign escape sequencies for those). On my home computer everithing is Ok, but @ work new keys don't work - instead of treating the sequence as a whole thing KTS just put separate characters into the stream.
Here is the part of a trace_file:
---------------------------------------------
3848 : 3852 2007- 9- 6 12:54:52 607 :183: KIni::GetHexKey( KKey, input241 ){
3848 : 3852 2007- 9- 6 12:54:53 198 :183: KIni::GetKey( KKey, input241 ){
3848 : 3852 2007- 9- 6 12:54:54 180 : 0: [ 1B 5B 6B ]
3848 : 3852 2007- 9- 6 12:54:54 290 : 0: }
3848 : 3852 2007- 9- 6 12:54:54 330 :183: [ [k ]
3848 : 3852 2007- 9- 6 12:54:54 380 : 0: }
3848 : 3852 2007- 9- 6 12:54:54 420 :183: KIni::GetHexKey( KKey, key241 ){
3848 : 3852 2007- 9- 6 12:54:54 470 :183: KIni::GetKey( KKey, key241 ){
3848 : 3852 2007- 9- 6 12:54:54 520 : 0: [ FFFFFFFF 1 8 0 1 70 0 8 0 1 70 ]
3848 : 3852 2007- 9- 6 12:54:54 560 : 0: }
3848 : 3852 2007- 9- 6 12:54:54 620 :183: [ 11 ]
3848 : 3852 2007- 9- 6 12:54:54 660 : 0: }
---------------------------------------------
I also changed the nuumber for the "eof":
---------------------------------------------
3848 : 3852 2007- 9- 6 12:55:16 522 :183: KIni::GetHexKey( KKey, input242 ){
3848 : 3852 2007- 9- 6 12:55:16 572 :183: KIni::GetKey( KKey, input242 ){
3848 : 3852 2007- 9- 6 12:55:16 632 : 0: [ eof ]
3848 : 3852 2007- 9- 6 12:55:16 682 : 0: }
3848 : 3852 2007- 9- 6 12:55:16 722 :183: eof
3848 : 3852 2007- 9- 6 12:55:16 772 : 0: }
-----------------------------------------------
BUT!!!
If I use smaller number for the new key - let say 2 not 241 - everithing works perfect!!!
It seems that KTS looses part of the keys-database with high numbers.
Again - the same utf-8.ini with the same setup parameters works on my home computer!!!
I tried many times - changed all the input escape sequencies, changed the order of definitions in the file, etc. The only thing that helps is to reduce the definition number.
Any suggestions?
regards,
|
PBig |
Figured it out |
Sep 08 2007 17:17 |
|
The definition for the 'Esc' had smaller number than my new key-codes, so your server treated my Esc-sequencies as 'Esc'-key + whatever left...
I moved Esc down to the end (next to the last one) and everything is OK now.
It wasn't EXACTLY the same utf-8.ini that I used at home after all :-)
Isn't that a good idea to sort your keys-database by lenght of the sequence (descending) after you load all the keys' definitions?
This way you don't even need those input/key pair numbers, just put your definitions at random order in pairs like [input sequence] = [key sequence], load them up and sort them out - done.
regards,
|
Kroum Grigorov |
|
Sep 10 2007 09:28 |
|
Yes, you need to put key defs in the correct orfder(sorted by length of the key input) or they won't be trated correctly.
I'll add the sort step in the next release, I was thinking of adding this long time ago but there was no demand for it so far.
Kroum
|
© 2007 - 2008 Kroum Grigorov