question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Shift+key denied by text field as "control character" on remote systems

See original GitHub issue

Describe the bug I cannot type any character with Shift modifier - no uppercase chars, no colon, no nothing. This does not happen on all systems.

To Reproduce Steps to reproduce the behavior:

  1. Pull the Terminal.GUI
  2. Start the unmodified UICatalog project
  3. Put the cursor in any text input field
  4. Type Shift+a - nothing happens
  5. Type a - a is typed

Expected behavior I expect A to be typed when pressing Shift+a

Screenshots It seems like the key is discarded as “control character”. So the InsertText (kb) is never reached.

image

This does not happen on all systems, but on the one I have the debugger running ^^ Either the check should ignore the Shift modifier, or in an earlier step a conversion of Shift+a to uppercase A fails. Not sure how it is supposed to work.

(Note: removing the numlock modifier makes no difference.)

Here is the corresponding KeyEventRecord: image

Desktop (please complete the following information):

Additional context

Call stack:

>	Terminal.Gui.dll!Terminal.Gui.TextField.ProcessKey(Terminal.Gui.KeyEvent kb) Line 565	C#
 	Terminal.Gui.dll!Terminal.Gui.View.ProcessHotKey(Terminal.Gui.KeyEvent keyEvent) Line 1881	C#
 	Terminal.Gui.dll!Terminal.Gui.Application.ProcessKeyEvent(Terminal.Gui.KeyEvent ke) Line 431	C#
 	Terminal.Gui.dll!Terminal.Gui.WindowsDriver.ProcessInput(Terminal.Gui.WindowsConsole.InputRecord inputEvent) Line 859	C#
 	Terminal.Gui.dll!Terminal.Gui.WindowsDriver.PrepareToRun.AnonymousMethod__34_0(Terminal.Gui.WindowsConsole.InputRecord e) Line 759	C#
 	Terminal.Gui.dll!Terminal.Gui.WindowsMainLoop.Terminal.Gui.IMainLoopDriver.MainIteration() Line 1881	C#
 	Terminal.Gui.dll!Terminal.Gui.MainLoop.MainIteration() Line 295	C#
 	Terminal.Gui.dll!Terminal.Gui.Application.RunMainLoopIteration(ref Terminal.Gui.Application.RunState state, bool wait, ref bool firstIteration) Line 1014	C#
 	Terminal.Gui.dll!Terminal.Gui.Application.RunLoop(Terminal.Gui.Application.RunState state, bool wait) Line 996	C#
 	Terminal.Gui.dll!Terminal.Gui.Application.Run(Terminal.Gui.Toplevel view, System.Func<System.Exception, bool> errorHandler) Line 1172	C#
 	UICatalog.dll!UICatalog.Scenario.Run() Line 200	C#
 	UICatalog.dll!UICatalog.UICatalogApp.Main(string[] args) Line 111	C#

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:13

github_iconTop GitHub Comments

2reactions
tznindcommented, Sep 14, 2022

Thanks for the screenshot wVirtualKeyCode is 231 in the image. The ConsoleKey Enum value for that is ‘Packet’:

Packet | 231 | The PACKET key (used to pass Unicode characters with keystrokes).

_https://docs.microsoft.com/en-us/dotnet/api/system.consolekey?view=net-6.0_

Not sure if that means anything but tomorrow I can try hacking my codebase to force every keystroke to those values and then step through the debugger to see if its being misinterpreted.

VK_PACKET 0xE7 Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KEYUP

1reaction
BDispcommented, Sep 14, 2022

Well I believe there some way to handle that PACKET key so the right keystroke is filtered. I’m curious 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Strange keyboard behavior in authentication dialog's ...
Try on the remote computer you RDP into to use regedit to go to key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout and ...
Read more >
A User TELNET
However, in UCSB's case, where a user's input device is an OLS keyboard (a ... TELNET sends to the remote system an 8-bit...
Read more >
How does the shift key in a keyboard work?
In this protocol, shift keys are no different to the "regular" typematic keys and rely on software in the operating system to translate...
Read more >
Privileged Remote Access 23.2 Access Console User Guide
A dialog box opens for you to enter administrative credentials to the remote computer in order to complete the Jump. The administrative rights...
Read more >
Web Interface User's Guide
This manual is a guide for the Intelli-M® Web Interface. The web interface enables configuring of an eIDC (ethernet. Integrated Door Controller) access ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found