Jump to content

Keyboard assignment dialog shows German keymap for assigned keys


tim copperfield

Recommended Posts

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:

 

image.png.4fea98b7d41f28b91be1648ca9f925de.png

 

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.

Link to comment
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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...