View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002340 | NoesisGUI | C++ SDK | public | 2022-04-29 19:15 | 2023-03-27 12:14 |
Reporter | sfernandez | Assigned To | sfernandez | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | assigned | Resolution | open | ||
Product Version | 3.1.4 | ||||
Target Version | 3.2 | ||||
Summary | 0002340: Create ShortcutTrigger that works well with focused TextBoxes | ||||
Description | Using KeyBindings for shortcuts has many limitations if not using Ctrl modifiers when focus is inside TextBoxes. Because shortcut letters won't be written into the text box (see https://stackoverflow.com/questions/33133485/wpf-keybinding-swallowing-keys-preventing-textbox-use). The alternative of using a KeyTrigger presents the opposite problem, because when the TextBox is focused the letters will be correctly added, but the trigger will also fire and execute its actions. To avoid these problems we need to implement a trigger that is aware of TextBox/PasswordBox being focused before trying to invoke the actions, something like this: void ShortcutTrigger::OnKeyPress(BaseComponent*, const Noesis::KeyEventArgs& e) { if (GetKey() == e.key && CheckModifiers() && Noesis::DynamicCast<Noesis::TextBox*>(e.source) == 0 && Noesis::DynamicCast<Noesis::PasswordBox*>(e.source) == 0) { InvokeActions(0); } } | ||||
Tags | No tags attached. | ||||
Platform | Any | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2022-04-29 19:15 | sfernandez | New Issue | |
2022-04-29 19:15 | sfernandez | Assigned To | => sfernandez |
2022-04-29 19:15 | sfernandez | Status | new => assigned |
2022-04-29 19:15 | sfernandez | Target Version | => 3.2.0 |
2023-03-27 12:14 | jsantos | Target Version | 3.2.0 => 3.2 |