INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: What does that means TranslateFlags="17" in Resource.xml?  (Read 444 times)

MaxA

  • Junior Woodchuck
  • **
  • Posts: 72
What does that means TranslateFlags="17" in Resource.xml?
« on: March 26, 2020, 05:54:26 pm »

Hi,

Can you explain what does attributies TranslateFlags, NoShowAsShortcut and Param="2" means?

<Entry Key="Up" Command="10018" Param="2" TranslateFlags="13" NoShowAsShortcut="1" />

Thanks, Max
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: What does that means TranslateFlags="17" in Resource.xml?
« Reply #1 on: March 27, 2020, 01:24:50 am »

It is all explained inside the Resource.xml file in green writing, although it is a little criptic.

Key="Up" is pretty obvious. It means this line applies to pressing the Up keyboard key.

Command="10018" is the MC Core Command that is to be issued when the Up key is pressed. In this case, "Volume Up". Reference https://wiki.jriver.com/index.php/Media_Center_Core_Commands

Param="2" refers to the parameter to be passed to the MCC (Media Centre Core Command) and is defined as "int nDeltaPercent", which I believe means "Integer Change in volume to apply in Percentage". So you should see a 2% increase in volume when you press the Up key, with this Hotkey.

TranslateFlags="13" defines when this Hotkey will be used. It is a compound number (for want of a better term), in that it is a number that can only be summed to in one way from the table in the Resource.xml file. That table is:
  TranslateFlags: flags that determine when and how an accelerator is translated (binary or'd together)
    1: don't translate in edits, comboboxes, and other data entry controls
    2: don't translate in fullscreen mode or theater view
    4: don't translate in any type of popup window
    8: only translate in fullscreen
    16: don't translate in IE, VB controls, or other unknown rich controls
    32: targets playback engine / display (DVD, image playback, etc.)
    64: only translate when Action Window is focused
    128: not in Theater View
    256: not in report controls
    512: not in web browser
    1024: not in video player

So "13" can only be summed from the above table by adding 8+4+1=13, which means that the Hotkey will not apply in edits, comboboxes, and other data entry controls, or in popup windows, and will only apply in fullscreen mode.

NoShowAsShortcut="1" is pretty obvious, and explained best by the text in the Resource.xml file:
"NoShowAsShortcut: 1 if you don't want MC to show this shortcut in menus, tooltips, etc."


Note that if a Hotkey is defined more than once in the Resource.xml file, I believe it is the last definition that gets used by MC. However, the same Hotkey can be defined multiple times and work differently in different areas of MC, as defined by the TranslateFlags setting.

Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner
Pages: [1]   Go Up