tim copperfield Posted November 1, 2017 Share Posted November 1, 2017 After posting the previous report about keyboard hotkeys in menus, I decided to investigate further to see what was involved with keyboard input. I noticed that when "Learn" is set to On, and some key combinations are pressed, the resulting characters show what would (presumably) be key names on the German keyboard layout: To get those 4, I've pressed, in order: Ctrl+` (back apostrophe, left of "1" key on standard 101 keyboard Ctrl+\ (backslash, above enter key) Ctrl+[ (these two should need no explanation) Ctrl+] There are probably others. Quote Link to comment
Griga Posted November 1, 2017 Share Posted November 1, 2017 5 hours ago, tim copperfield said: I noticed that when "Learn" is set to On, and some key combinations are pressed, the resulting characters show what would (presumably) be key names on the German keyboard layout: Confirmed. I could spot it in the code. It's hardcoded in a function KeyToStr that translates virtual key codes to strings. I suppose the keyboard layout dependent ones are VK_OEM_1...VK_OEM_8 and VK_OEM_102. Unfortunately KeyToStr is used for displaying keys as well as for assigning keys to actions. Have a look at your DVBViewer configuration folder\Remotes\default.remote file, then you'll know what I mean. "Value" specifies the action, "Event" is the associated key. When you press a key or key combination DVBViewer uses KeyToStr for translating it to the corresponding Event string (e.g. CTRL S) and searches it in the list in order to find the associated action value and perform the action. There are two nasty consequences: In all countries the key names are displayed in English on the Options -> Input page (except the hardcoded ones that you have encountered, of course). Existing key -> action assignments won't work anymore with a redesigned KeyToStr function that provides variable translations depending on the language or keyboard layout. Whoever made this was very creative in inventing something real insane. There is even more about it that I don't want to spread out here. I've already managed to fix some of the stuff in the 6.0.4 release (search for input options), but that was just the tip of the iceberg. Separating the key code -> string translation for display and assignment purpose seems to be the next step to go. However, I don't know when I will find time for it, because development will rather focus on the Media Server in the next weeks. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.