How to add a dedicated brightness or contrast control?

This is more of a Kodi question (and has been posted on their official forum) but I figured, as the team here seem pretty knowledgeable I could cross-post here.

Please note the following taken from the part of my keymap for keyboard.xml :-

  <four mod="ctrl,alt">AudioDelay</four>
  <five mod="ctrl,alt">SubtitleDelay</five>
  <six mod="ctrl,alt">ActivateWindow(123)</six>
  <seven mod="ctrl,alt">ActivateWindow(124)</seven>
  <eight mod="ctrl,alt">ActivateWindow(125)</eight>

I set it up to use modified keys as a method of using FLIRC and not interfering with my regular keymap, although of course they work on a USB or bluetooth keyboard as well. In fullscreen video this gives me easy access to things I often need to adjust, quickly, without having to make lots of button presses. I map them to the colour buttons for ease of use, so for example yellow :yellow_circle: (six mod=“ctrl,alt”) with this keymap brings up Video Settings in FullscreenVideo window.

What I am looking for and can’t seem to find by looking at Action IDs and Window IDs, is the equivalent control for Brightness and Contrast. With my particular setup using an OSMC Vero 4K I sometimes need to boost the contrast or brightness (or both) of 4K content on my particular set and I would like shortcuts so I don’t have to dig through menus while a video plays, I just have a drop down mini dialogue for Brightness and Contrast the same way I currently do for AudioDelay and SubtitleDelay.

Is this possible? If so what dialog or window am I calling by name or ID? Despite searching around I can’t seem to find how to do this, and DialogSettings.xml in skin files is a generic basis for osdvideosettings and osdaudiosettings among others so I can’t just find the correct from there.

Thanks in advance.

I don’t think you can. Actions to perform these functions do not seem to currently exist, and the long way round where you would call up the video settings window and select a particular option I’ve never managed to make work. I had some discussion with @Chillbo when I was trying to do this type of thing and he had also tried something similar and never figured out a working solution.

DD, as ever you are a fountain of Kodi-related knowledge.

Yeah I figured these are Kodi-generated dialogs and they’re only using the skin file to set the UI look as it’s generic XML. I guess there’s no internal call for this, and you can’t set the default control focus due to that generic XML template thing (it always defaults to the top of the list).

Another Kodi “hard limit” which I think is related, correct me if I’m wrong, is that regardless of the skin, the DialogSetting.xml doesn’t allow PageDown/PageUp scrolling within the dialog window? As far as I remember this was a problem with every post-Jarvis release. It’s the only type of window with scrolling that doesn’t allow that, in my experience.

That’s what my theory was as well, put in perfect words :slightly_smiling_face: Quite annoying that this can’t be done.

Something happening with page up/down outside of the keymap I think would probably be skin related, but I’ve never spent the time to figure out how skinning works so take that with a grain of salt. I think normally they are only used to navigate a list, and a settings dialog pane is not a list. Certain things can be defined in a skin and then called with a keymap I know; SendClick(14) in the Library views probably being the most wildly known. As for the ActivateWindowAndFocus I think it probably has to do with some lower level way the windows are drawn, but again I don’t claim to understand it. I can get that action to work with something like a system setting without issue. But when I tried pulling off the same thing with the osdaudiosettings window I couldn’t get anywhere with the ‘focus’ part and gave up after playing around with it awhile without progress.

It is a list. But it’s defined by skins differently in that settings dialog than in other windows. In other windows skins do define the list including the actualy layout inside, etc. For this dialog, a skin only defines the very basics of that list (basically only that the list should exist and where). It does exist, but Kodi seems to be treating it differently than other, normal lists :see_no_evil: :man_shrugging:t2:

Yeah this is what I figured, and this suggests to me it’s a mistake in the code. Usually the UI behaviour is “if window or dialog has scrollbar, can be scrolled with PageDown/PageUp”. I ran Jarvis for years before upgrading to Leia and the old behaviour for those kinds of dialogs was that they would scroll that way. It’s so weird that Kodi had a change that violated it’s own UI behaviour and it’s gone unchecked for a couple of main versions including several subversions.

Incongruous UI elements like that are exactly why I stayed away from Windows 10 for as long as possible - it’s like a horrendous mismash of this new post-Metro overlay with dark menus, older Windows 7 ones with light menus and (if you dig far enough back in the settings) some 98/XP era stuff. It’s telling that Windows 10 still has dialog boxes appearing in a position that would be centralised if running in 800x600 resolution, but appear tiny in the top left with modern widescreen ones. Thank God with Kodi that it’s just that one small thing, but I never miss an opportunity to flog Windows 10 :joy:

Well, if the scrolling with page down and page up keys depends on the scrollbar, that might be the reason: there’s none for the OSD settings dialogs. There’s none because it’s not configured and there’s none because OSD settings dialogs don’t have significantly more than one page. So, from a logic standpoint it wouldn’t make sense to be able to jump up or down one page, if there aren’t even two pages there… This would be consistent with the UI behavior in other places as well.