View Issue Details

IDProjectCategoryView StatusLast Update
0002135Far ManagerKeyboardpublic2012-09-20 12:40
ReportertheultramageAssigned To2useven10 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx64OSWindowsOS Version7
Product Version3.0 
Target VersionFixed in Version3.0 
Summary0002135: typing 'shift + letter' diacritic sequence also outputs the + character
DescriptionWhen using the Slovak keyboard layout, it is possible to type characters with the ˇ (caron) diacritic by entering the sequence 'shift' '=' '<letter>'. Since last year, FAR also outputs the '+' character (which is what shift+= maps to on the US keyboard). This is undesirable. Note that strangely, the adjacent sequence 'shift -' for the ´ (acute) symbol does not have this issue.

Listed in the 'additional information' section are versions I tested. That could help you narrow down the revision that caused the problem.
Steps To Reproduce1. Switch to Slovak keyboard layout.
2. Type the 'SHIFT =' combo, followed by, say, the letter 'c'.

Expected output: č
Observed output: +č
Additional Informationversions tested:
Far-3.0.0.2098 (r6425) <- OK
Far-3.0.0.2214 (r6757) <- bug
Far-3.0.0.2627 (r7920) <- bug
Far-3.0.0.2768 (r8261) <- bug
TagsNo tags attached.
Build2809

Relationships

related to 0001832 assignedvskirdin Проблема FarNameToInputRecord / FarInputRecordToName 

Activities

2useven10

2012-07-24 14:08

developer   bugnote:0009428

Last edited: 2012-07-24 14:10

View 2 revisions

Can't reproduce...
Far3 2768 <- ok
Far3 2772 <- ok

Try to switch off plugins/macros 'far /p /m'

theultramage

2012-07-25 16:14

reporter   bugnote:0009437

Doing that, and deleting all plugins, and deleting my appdata/roaming profile has no impact on the bug. However, I noticed that I'm running slovak locale on an english language pack. When I switch to a different user that doesn't use the language pack, it works there just fine.

When I find the time I'll do build&test runs on various revisions to pinpoint the revision where the behavior changed, and then identify the code that causes it.

2useven10

2012-07-25 16:36

developer   bugnote:0009438

Last edited: 2012-07-25 16:38

View 2 revisions

what is other programs (notepad, cmd.exe) behaviour ?

theultramage

2012-07-25 18:28

reporter   bugnote:0009441

Only FAR seems to be having this problem. Also note what I said at the beginning - when I run the older r6425 build, it works just fine. I'll try to find the true cause for you within the next 2 weeks.

2useven10

2012-07-25 18:36

developer   bugnote:0009442

you can use nightly build archive to estimate first problem build.
http://www.farmanager.com/nightly.php

2useven10

2012-08-09 12:46

developer   bugnote:0009466

two weeks later...

theultramage

2012-08-09 20:59

reporter   bugnote:0009469

Heh, work+vacation, didn't have my vs2010 build environment to do the tests, and the builds inside the link you posted only go to december 2011 (which is several months too late).

r6496 | skirda | 2011-08-01 13:47:15 +0200
Mantis#0001832 - http://bugs.farmanager.com/view.php?id=1832

theultramage

2012-08-09 21:08

reporter   bugnote:0009470

Last edited: 2012-08-09 21:35

View 6 revisions

The offending change is:
+ case VK_OEM_MINUS:
+ return '_';
+ //return KEY_SHIFT|'-';
+ case VK_OEM_PLUS:
+ return '+';
+ //return KEY_SHIFT|'+';

The code was later changed to, which is apparently trying to do something...
            case VK_OEM_MINUS:
                return (Char>=' ')?Char:'_';
            case VK_OEM_PLUS:
                return (Char>=' ')?Char:'+';

My current fix is:
            case VK_OEM_MINUS:
                return (Char>=' ')?Char:KEY_SHIFT|'-';
            case VK_OEM_PLUS:
                return (Char>=' ')?Char:KEY_SHIFT|'=';
(although I don't really know what I'm doing)

2useven10

2012-08-10 15:15

developer   bugnote:0009471

Unfortunately I can't check that.
Always have č only...

2useven10

2012-08-15 13:43

developer   bugnote:0009481

similar problem (russian forum)
http://forum.farmanager.com/viewtopic.php?f=9&t=7346

theultramage

2012-08-16 00:16

reporter   bugnote:0009482

Last edited: 2012-08-16 00:26

View 2 revisions

Umm, this is going to sound really stupid, but here's what I found while testing...
1) install sk win7 into virtualbox VM
2) install en LIP and switch interface to en
3) confirm that the bug is present
4) switch back to sk, then switch again to en
5) confirm that the bug is gone

I'm not kidding, I re-ran steps 3-5 several times using an immutable disk image, and it's always the same - switching to sk fixes it, and it stays fixed when switching back to en. I don't understand. If needed I can re-test it from step 1.
EDIT: confirmed on the laptop I originally reported this from.

2useven10

2012-08-16 01:52

developer   bugnote:0009483

Last edited: 2012-08-16 06:16

View 2 revisions

It is funny micracle soft. But anyway I think it should be fixed in farmanager.
There is almost the same problem with sweden W8. Please keep bugly system environment to test possible fix[es].
(I hope from originators of 0001832).

Maximus

2012-08-16 23:43

reporter   bugnote:0009487

Please, provide output of KeyEvents utility
http://code.google.com/p/conemu-maximus5/downloads/detail?name=KeyEvents4.7z

You need to start it from Far, type sequence 'shift' '=' '<letter>' and attach output here.

This issue does not reproduced on my PC, too.

theultramage

2012-08-17 02:47

reporter   bugnote:0009491

Last edited: 2012-08-17 02:53

View 6 revisions

That is a pretty awesome tool!
Here's the recording. It's the same for both the bugged and fixed VM state.

Dn, Vk="VK_SHIFT"    [ 16/0x0010], Scan=0x002A uChar=[U=' ' (0x0000): A=' ' (0x00)] Ctrl=0x10
Dn, Vk="VK_OEM_PLUS" [187/0x00BB], Scan=0x000D uChar=[U=' ' (0x0000): A=' ' (0x00)] Ctrl=0x10
Up, Vk="VK_OEM_PLUS" [187/0x00BB], Scan=0x0000 uChar=[U=''  (0x02C7): A='ă' (0xC7)] Ctrl=0x10
Up, Vk="VK_OEM_PLUS" [187/0x00BB], Scan=0x000D uChar=[U=''  (0x02C7): A='ă' (0xC7)] Ctrl=0x10
Up, Vk="VK_SHIFT"    [ 16/0x0010], Scan=0x002A uChar=[U=' ' (0x0000): A=' ' (0x00)] Ctrl=0x00
Dn, Vk="VK_C"        [ 67/0x0043], Scan=0x002E uChar=[U=''  (0x010D): A=' ' (0x0D)] Ctrl=0x00
Up, Vk="VK_C"        [ 67/0x0043], Scan=0x002E uChar=[U='c' (0x0063): A='c' (0x63)] Ctrl=0x00


Maximus

2012-08-18 02:53

reporter  

Diacritic1.diff (3,992 bytes)
Diacritic1.diff (3,992 bytes)

Maximus

2012-08-18 02:54

reporter   bugnote:0009492

Patch implement sort of shamanism for dead keys. Hope, it's working.

2useven10

2012-09-05 16:20

developer   bugnote:0009502

2794 (from Maximus)

theultramage

2012-09-05 17:31

reporter   bugnote:0009503

Made a clean far build, still happens there.
Currently using the patch I mentioned in my 4th post to work around the issue.

2useven10

2012-09-13 22:26

developer   bugnote:0009516

once more (I can't reproduce again)...
http://forum.farmanager.com/viewtopic.php?f=37&t=7387

2useven10

2012-09-18 22:17

developer   bugnote:0009523

2 Maximus.
Bug reproduced on my win7.
English and Russian languages installed. Active language is English.
Czech Qwerty keyboard layout added.

2useven10

2012-09-19 10:30

developer   bugnote:0009524

Last edited: 2012-09-19 10:36

View 2 revisions

2 Maximus
MapVirtualKey() doesn't detect deadkey, so patch is useless here.
What is wrong with theultramage fix ? It seems to work.
And why KEY_SHIFT | ... combinations were replaced originally ?

Maximus

2012-09-19 11:32

reporter   bugnote:0009525

Well, I'll try to explain, what confuses me.

This patch

            case VK_OEM_MINUS:
                 return (Char>=' ')?Char:KEY_SHIFT|'-';
             case VK_OEM_PLUS:
                 return (Char>=' ')?Char:KEY_SHIFT|'=';

takes into account only two keys. Much more keys may produce dead keys...
And, I think, it must be

                 return (Char>=' ')?KEY_NONE:...

My patch - was a try to unify all keys, not just "+"/"-". We may try to replace

        UINT uCalcChar=MapVirtualKey(KeyCode,MAPVK_VK_TO_CHAR);
        if (!uCalcChar)
            return KEY_NONE;

with just
                return KEY_NONE;

May be, it will works?

theultramage

2012-09-19 13:00

reporter   bugnote:0009526

Last edited: 2012-09-19 18:01

View 3 revisions

> And why KEY_SHIFT | ... combinations were replaced originally ?
Just a cosmetic thing I believe, KEY_SHIFT|'-' == '_' and KEY_SHIFT|'=' == '+'. The author of the original r6496 edit used the compact version and left the expanded version as commented out lines (which was really confusing), and he made a typo in the commented line (more confusion). I thought it would be more readable if I used the expanded form since it shows the keys you actually have to press... but looking at it now, since the cases are VK_OEM_PLUS and VK_OEM_MINUS, maybe using + and - would make more sense.
EDIT: never mind, I was wrong, KEY_SHIFT is not an ascii flag, it's a FAR-specific define with value 0x04000000 and special meaning.

2useven10

2012-09-19 13:43

developer   bugnote:0009527

2809. both fixes here. maximus code works.

theultramage

2012-09-19 18:10

reporter   bugnote:0009528

Confirmed working on my win7 system + in vbox VM that also had the problem.
Thank you for finding the time to reproduce and fix it.

Issue History

Date Modified Username Field Change
2012-07-18 19:59 theultramage New Issue
2012-07-24 14:08 2useven10 Note Added: 0009428
2012-07-24 14:10 2useven10 Note Edited: 0009428 View Revisions
2012-07-25 16:14 theultramage Note Added: 0009437
2012-07-25 16:36 2useven10 Note Added: 0009438
2012-07-25 16:38 2useven10 Note Edited: 0009438 View Revisions
2012-07-25 18:28 theultramage Note Added: 0009441
2012-07-25 18:36 2useven10 Note Added: 0009442
2012-08-09 12:46 2useven10 Note Added: 0009466
2012-08-09 20:59 theultramage Note Added: 0009469
2012-08-09 21:08 theultramage Note Added: 0009470
2012-08-09 21:10 theultramage Note Edited: 0009470 View Revisions
2012-08-09 21:10 theultramage Note Edited: 0009470 View Revisions
2012-08-09 21:27 theultramage Note Edited: 0009470 View Revisions
2012-08-09 21:32 theultramage Note Edited: 0009470 View Revisions
2012-08-09 21:35 theultramage Note Edited: 0009470 View Revisions
2012-08-10 15:15 2useven10 Note Added: 0009471
2012-08-15 13:41 2useven10 Relationship added related to 0001832
2012-08-15 13:43 2useven10 Note Added: 0009481
2012-08-16 00:16 theultramage Note Added: 0009482
2012-08-16 00:26 theultramage Note Edited: 0009482 View Revisions
2012-08-16 01:52 2useven10 Note Added: 0009483
2012-08-16 06:16 2useven10 Note Edited: 0009483 View Revisions
2012-08-16 23:43 Maximus Note Added: 0009487
2012-08-17 02:47 theultramage Note Added: 0009491
2012-08-17 02:49 theultramage Note Edited: 0009491 View Revisions
2012-08-17 02:50 theultramage Note Edited: 0009491 View Revisions
2012-08-17 02:51 theultramage Note Edited: 0009491 View Revisions
2012-08-17 02:52 theultramage Note Edited: 0009491 View Revisions
2012-08-17 02:53 theultramage Note Edited: 0009491 View Revisions
2012-08-18 02:53 Maximus File Added: Diacritic1.diff
2012-08-18 02:54 Maximus Note Added: 0009492
2012-09-05 16:20 2useven10 Note Added: 0009502
2012-09-05 16:20 2useven10 Assigned To => 2useven10
2012-09-05 16:20 2useven10 Status new => feedback
2012-09-05 17:31 theultramage Note Added: 0009503
2012-09-05 17:31 theultramage Status feedback => assigned
2012-09-13 22:26 2useven10 Note Added: 0009516
2012-09-18 22:17 2useven10 Note Added: 0009523
2012-09-19 10:30 2useven10 Note Added: 0009524
2012-09-19 10:36 2useven10 Note Edited: 0009524 View Revisions
2012-09-19 11:32 Maximus Note Added: 0009525
2012-09-19 13:00 theultramage Note Added: 0009526
2012-09-19 13:00 theultramage Note Edited: 0009526 View Revisions
2012-09-19 13:43 2useven10 Note Added: 0009527
2012-09-19 13:43 2useven10 Status assigned => feedback
2012-09-19 18:01 theultramage Note Edited: 0009526 View Revisions
2012-09-19 18:10 theultramage Note Added: 0009528
2012-09-19 18:10 theultramage Status feedback => assigned
2012-09-20 12:40 2useven10 Build => 2809
2012-09-20 12:40 2useven10 Status assigned => closed
2012-09-20 12:40 2useven10 Resolution open => fixed
2012-09-20 12:40 2useven10 Fixed in Version => 3.0