airdcpp / airdcpp-windows

http://www.airdcpp.net
GNU General Public License v3.0
80 stars 19 forks source link

Hotkeys didn't work #77

Open infectormp opened 1 year ago

infectormp commented 1 year ago

Hotkeys didn't work if language switched to Russian, crtl-a as example

RoLex commented 1 year ago

What should the Ctrl+A shortcut perform using original language? The developers have hard time to test with Russian language, because they don't have the letters like you have. But I could help you, just to test what is wrong.

infectormp commented 1 year ago

@RoLex all knows what Ctrl+A shortcut performs. This global key combination does the same in any application (select all item in a view) isn't it?

RoLex commented 1 year ago

I didn't really understand what you mean with switching language - the interface language or keyboard language, but I tested both on Windows 11 and AirDC++ 4.20. I can use Ctrl+A on any component in any window, regardless of application interface language or keyboard language - russian or english.

Could you please be more specific in which window you are testing the Ctrl+A combination?

Also, did you possibly modify the ru_RU.xml with an entry that uses Ctrl+A as shortcut? You can search the XML file:

<String Name="MenuDownloadQueue">&amp;Очередь скачивания Ctrl+D</String>

In that case the shortcut has priority over Windows shortcuts.

infectormp commented 1 year ago

Download any file list, open folder in it, try to select all files\folders using CTRL-A combination when input language is Russian.

I didn't modify any AirDC files.

AirDC 4.21b

RoLex commented 1 year ago

So I have investigated this issue.

Windows ListView control ( https://learn.microsoft.com/en-us/windows/win32/controls/list-view-controls-overview ) as it is, does not implement all item selection shortcut, like other text handling controls do. So the only solution here is to implement custom selection on key press handler, exactly as Jacek Sieka did ( https://github.com/airdcpp/airdcpp-windows/blob/master/windows/ExListViewCtrl.h#L154 ), the code waits for Ctrl+A as english letter.

It's hard to write this code for other languages and corresponding letters without possibly breaking other type of shortcut handling. But it is possible yes, for each language separately though.