View Issue Details

IDProjectCategoryView StatusLast Update
0003586Far ManagerPlugins API.Dialogpublic2018-02-27 09:25
ReporterpepakAssigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Platformx64OSWindowsOS Version7
Product Version3.0 
Target VersionFixed in Version 
Summary0003586: Listbox captures most keyboard events
DescriptionListbox seems to capture most keyboard events when it has a focus. Assume a dialog with:

1) Listbox (with DIF_LISTNOAMPERSAND and no other flag, but it behaves the same with no flags),
2) Edit,
3) Button with a shortcut due to an ampersand (e.g. with text such as "&Cancel"),
4) possibly other controls (buttons, checkboxes).

I want to activate the ampersanded button using a keyboard shortcut. The dialog will behave differently depending on which dialog element has a focus:

1) When a button or a checkbox is focused, I can use C, ALT+C.
2) When the edit is focused, I can use ALT+C (C is unavailable because it is used to enter text into the edit, that's OK).
3) When the listbox is focused, neither C nor ALT+C will reach the button.

Note that if the button also has a DIF_DEFAULTBUTTON, then ENTER activates the button in case 2 above (not sure about case 1, *some* button gets activated but I didn't check which) but not in case 3. ESC properly closes the dialog regardless of focus.
Steps To ReproduceThe behavior can be seen even in code from other people's plugins, as long as they use a listbox:

1) Make sure the FarColorer plugin is installed. That should normally be the case as the plugin is distributed along with FAR Manager.
2) Go to Options -> Plugins -> FarColorer.
3) Go to Scheme settings (bottom right).
4) Notice that the Cancel button has a hotkey C ("&Cancel").
5) Make sure that any one of the three edits is focused and press ALT+C. The dialog closes.
6) Reopen the Scheme settings.
7) Focus the Parameters listbox and press ALT+C. Nothing happens.
Additional InformationTested with build 5134 as well as 5151. Default configuration, except for a modified far.exe.ini:

[General]
UseSystemProfiles=0
UserProfileDir=%FARHOME%\Profile
UserLocalProfileDir=%FARHOME%\Profile

Tested with Windows 7 and Windows 10.
Tagsfocus, hotkey, listbox
Build

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2018-02-27 09:24 pepak New Issue
2018-02-27 09:25 pepak Tag Attached: focus
2018-02-27 09:25 pepak Tag Attached: hotkey
2018-02-27 09:25 pepak Tag Attached: listbox