Skip to content

VNCConn: fix wrong keysym for Ctrl+Shift+symbol keys - #305

Open
michael-adler wants to merge 1 commit into
bk138:masterfrom
michael-adler:ctrl_shift
Open

VNCConn: fix wrong keysym for Ctrl+Shift+symbol keys#305
michael-adler wants to merge 1 commit into
bk138:masterfrom
michael-adler:ctrl_shift

Conversation

@michael-adler

Copy link
Copy Markdown

Ctrl-held keys collapse to ASCII C0 control codes (0..31); the revert added 96 unconditionally, correct only for Ctrl+'a'..'z'. Codes 0 and 27..31 are Ctrl+'@ [ \ ] ^ ' and need +64, so Ctrl+Shift+Minus (code 31) became DEL (127) instead of '' (95).

On Mac, Ctrl also routes non-letter keys through Cocoa's doCommandBySelector:, which drops Shift before wx ever sees the char, independent of the above. Reconstruct it via UCKeyTranslate against the live keyboard layout when Shift+Ctrl are both down.

Ctrl-held keys collapse to ASCII C0 control codes (0..31); the
revert added 96 unconditionally, correct only for Ctrl+'a'..'z'.
Codes 0 and 27..31 are Ctrl+'@ [ \ ] ^ _' and need +64, so
Ctrl+Shift+Minus (code 31) became DEL (127) instead of '_' (95).

On Mac, Ctrl also routes non-letter keys through Cocoa's
doCommandBySelector:, which drops Shift before wx ever sees the
char, independent of the above. Reconstruct it via UCKeyTranslate
against the live keyboard layout when Shift+Ctrl are both down.
@michael-adler

Copy link
Copy Markdown
Author

See also wxWidgets/wxWidgets#26810, though that isn't the whole story. VNC probably shouldn't be mapping ^C to ^c before sending to the remote host since the remote host could be configured to handle them differently, so even "corrected" wxWidgets behavior is still probably wrong for VNC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant