View Issue Details

IDProjectCategoryView StatusLast Update
0005754DarkRadiantGUIpublic12.09.2021 07:21
Reporterduzenko Assigned Toduzenko  
PrioritynormalSeveritynormalReproducibilityhave not tried
Status resolvedResolutionfixed 
PlatformPCOSWindowsOS Version10
Product Version2.13.0 
Target Version2.14.0Fixed in Version2.14.0 
Summary0005754: Ctrl-S does not work when focus is on inputs
DescriptionIf I've just finished typing into spawn arg inputs and the focus is still there, I need to click somewhere else for the Ctrl-S shortcut to work
TagsNo tags attached.

Activities

duzenko

duzenko

11.09.2021 09:18

developer   ~0014347

Last edited: 11.09.2021 09:21

@greebo
Sorry, can you shed some light here?
It seems that by default menu shortcuts remain active with inputs with wxWidgets in general
Here's the test program that demonstrates this (built with the DR wxWidgets files)

Is there some kind of manual override that prevents this in DR?
BTW I noticed that e.g. Esc shortcut still works. Do you intercept alpha keys somewhere?
image.png (8,031 bytes)   
image.png (8,031 bytes)   
Project1.zip (3,639 bytes)
greebo

greebo

11.09.2021 12:04

administrator   ~0014349

The vanilly wxWidgets menu item handling has some things going on behind the scene. For instance, it will inspect the display string you pass to the menu item and will extract the Shortcut "Ctrl-S" from it, registering it as "global hotkey". That's why you see that behaviour.

DR is not using the global hotkeys, it has custom handling for shortcuts and mouse events. You can have a look at the radiant/eventmanager/ folder. There's a GlobalKeyEventFilter class which can you probably make some sense of. It intercepts the key events on a low level and deals with the exceptions.
duzenko

duzenko

11.09.2021 18:04

developer   ~0014352

https://github.com/codereader/DarkRadiant/pull/20/files

Related Changesets

DarkRadiant: master ebe064a1

2021-09-12 04:30:05

greebo


Committer: GitHub Details Diff
0005754: Merge pull request 0000020 from duzenko/5754_shortcuts_inputs

Simple filter to allow some menu shortcuts when focus is on a text input
Affected Issues
0000020, 0005754
mod - radiant/eventmanager/GlobalKeyEventFilter.cpp Diff File

DarkRadiant: master 8e1dafbc

2021-09-12 07:21:37

greebo

Details Diff
0005754: Add Ctrl-A to list of shortcuts. Refactoring. Affected Issues
0005754
mod - radiant/eventmanager/GlobalKeyEventFilter.cpp Diff File

Issue History

Date Modified Username Field Change
10.09.2021 08:03 duzenko New Issue
10.09.2021 19:29 duzenko Assigned To => duzenko
10.09.2021 19:29 duzenko Status new => assigned
11.09.2021 09:18 duzenko Note Added: 0014347
11.09.2021 09:18 duzenko File Added: image.png
11.09.2021 09:18 duzenko File Added: Project1.zip
11.09.2021 09:19 duzenko Note Edited: 0014347
11.09.2021 09:19 duzenko Note Edited: 0014347
11.09.2021 09:21 duzenko Note Edited: 0014347
11.09.2021 12:04 greebo Note Added: 0014349
11.09.2021 18:04 duzenko Note Added: 0014352
12.09.2021 04:30 greebo Changeset attached => DarkRadiant master ebe064a1
12.09.2021 04:30 greebo Status assigned => resolved
12.09.2021 04:30 greebo Resolution open => fixed
12.09.2021 04:30 greebo Fixed in Version => 2.14.0
12.09.2021 04:30 greebo Product Version => 2.13.0
12.09.2021 04:30 greebo Target Version => 2.14.0
12.09.2021 07:21 greebo Changeset attached => DarkRadiant master 8e1dafbc