magiblot / turbo

An experimental text editor based on Scintilla and Turbo Vision.
Other
466 stars 36 forks source link

Shift+Arrow_keys text selection is not working under putty4far2l #47

Closed unxed closed 1 year ago

unxed commented 1 year ago

Tested the new improved clipboard support (great job, thanks!). Noticed that in the far2l extension mode, text selection with the shift+arrow_keys works under far2l, but does not work in putti4far2l. Can't figure out for now if the bug is in putty4far2l or in turbo.

unxed commented 1 year ago

The reason, apparently, is that in putty4far2l non-standard dwControlKeyState bits are supported to distinguish left and right shift keys:

define RIGHT_SHIFT_PRESSED 0x0400

define LEFT_SHIFT_PRESSED 0x0200

Values are taken from this proposal. But turbo probably fails to understand those bits.

If I comment out

            if (GetAsyncKeyState(VK_LSHIFT)) { ctrl |= RIGHT_SHIFT_PRESSED; }
            if (GetAsyncKeyState(VK_RSHIFT)) { ctrl |= LEFT_SHIFT_PRESSED; }

in putty4far2l, the bug is gone.

unxed commented 1 year ago

https://github.com/magiblot/tvision/pull/92