Kodi Community Forum

Full Version: changing mouse buttons doesn't work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I wanted to change mouse buttonfunctions. I managed to change the wheel click into full screen and back to window. (in the mouse.xml file)

I tried to change leftclick and rightclick into volume up and down, just in Fullscreenvideo, but I can't get it to work, neighter play and pause at doubleclick left. What do I do wrong, when I tried to do it the same way I managed the fullscreen in global?

I also have back and forward buttons on my mouse, witch I use as my main remote, I would like those to put into use as well, but I don't see referrence to them.


I also don't know how to upload the scrips changes I made so they can be viewed like I saw elsewere.
Can you paste what you did in mouse.xml?
Ah, I first tried to copy it from explorer, but it lost format. From notepad it goes better......

You can see that in <global> I changed middleclick from middleclick into TroggleFullScreen

I changed <SlideShow> into ,<FullScreenVideo> and tried to alter the functions for wheeldown and wheelup..... it doesn't work.

<keymap>
<global>
<mouse>
<leftclick>leftclick</leftclick>
<middleclick>ToggleFullScreen</middleclick>
<rightclick>rightclick</rightclick>
<doubleclick>doubleclick</doubleclick>
<wheeldown>wheeldown</wheeldown>
<wheelup>wheelup</wheelup>
<mousedrag>mousedrag</mousedrag>
<mousemove>mousemove</mousemove>
</mouse>
</global>
<FullscreenVideo>
<mouse>
<wheeldown>VolumeDown</wheeldown>
<wheelup>VolumeUp</wheelup>
</mouse>
</FullscreenVideo>
</keymap>

PS: it looses the spacings when I past it here
(PS2: I doen't use slideshow, that's why I left that )
Enable debug log (wiki)ging in XBMC, play a video in fullscreen, scroll your mouse wheel up and down, stop the video and exit XBMC. Locate the debug log (wiki) (xbmc.log) and examine it to see how/if XBMC recognized the mouse wheel scrolling while you were watching the video.

Another thing you might want to try (just as a test) is to move the VolumeUp/VolumeDown mappings for the mouse wheel to the <global> section to see if they are recognized at that location.
Ok
This

20:17:22 T:2840 DEBUG: CApplication:TonguerocessMouse: trying mouse action ToggleFullScreen
20:17:22 T:2840 DEBUG: CWinSystemWin32::SetFullScreen (windowed) on screen 0 with size 1920x1028, refresh 0.000000
20:17:22 T:2840 DEBUG: CWinSystemWin32::ResizeInternal - resizing due to size change (0,0,1920,1080 fullscreen)->(-8,-8,1928,1058)
20:17:22 T:2840 DEBUG: CWinEventsWin32::WndProc: window move event
20:17:22 T:2840 DEBUG: CWinEventsWin32::WndProc: window resize event
20:17:22 T:2840 DEBUG: CRenderManager::UpdateDisplayLatency - Latency set to 0 msec

is were I goto full screen I think.

After that I get multiple lines of this:
20:17:22 T:5768 DEBUG: CThumbExtractor:Big GrinoWork - trying to extract filestream details from video file smb://FB-SERVER/Films/Iron Man 2 (2010)/VIDEO_TS/VIDEO_TS.IFO
for e few different movies.
I can't see any thing referring to mousewheel actions.

I did notice that the pause button was flickering while scrolling the mousewheel.

So I'm not sure what to look for exactly in the log file....

Did you also try the test of moving those volume mappings for the wheel to the <global> section to see if it makes any difference?
Sorry I only had time to look into it just now.....

When I put in in <global> it does work. In the right uppercorner of the screen a volume-bar appears and I can change the volume. But.... also, as I expected, I lost the scrollfunctionality for scrolling through lists: it's always volume up or down.

In the logfile I can see the actions but not anything I understand or interpret as wrong
(2013-01-06, 20:33)FIBO Wrote: [ -> ]also, as I expected, I lost the scrollfunctionality for scrolling through lists: it's always volume up or down.

Right, that's why I said it was just a test. I wanted to see if problem was with the VolumeUp/VolumeDown functions being assigned to the wheel or if it had to do with the placement of the assignments. It appears the problem is with the latter.
it has to do with the <FullscreenVideo> part, but I copied that from keymaps/keyboard.xml

Also maybe the mousewheel is not the best choice (or just not the easiest), if I could get the last two mouse buttons (back and forward) to work. Those can be named in <global> as well
(2013-01-06, 20:58)FIBO Wrote: [ -> ]it has to do with the <FullscreenVideo> part, but I copied that from keymaps/keyboard.xml
Right, but it could be possible that <FullscreenVideo> isn't recognized for <mouse> assignments? You can test that theory by assigning unique functions to the left/right mouse buttons in the <FullscreenVideo> section and see if these work while watching a video.

Quote:Also maybe the mousewheel is not the best choice (or just not the easiest), if I could get the last two mouse buttons (back and forward) to work. Those can be named in <global> as well
You can enable debug log (wiki)ging in XBMC, press each of those buttons several times, exit XBMC and examine your debug log (wiki) (xbmc.log) to see if XBMC even recognizes those buttons and, if so, how XBMC identifies them.

(2013-01-06, 22:17)artrafael Wrote: [ -> ]
(2013-01-06, 20:58)FIBO Wrote: [ -> ]it has to do with the <FullscreenVideo> part, but I copied that from keymaps/keyboard.xml
Right, but it could be possible that <FullscreenVideo> isn't recognized for <mouse> assignments? You can test that theory by assigning unique functions to the left/right mouse buttons in the <FullscreenVideo> section and see if these work while watching a video.

Quote:I tried that, indeed I don't get any result assigning mousebuttons in <FullScreenVideo>.

Also maybe the mousewheel is not the best choice (or just not the easiest), if I could get the last two mouse buttons (back and forward) to work. Those can be named in <global> as well
You can enable debug log (wiki)ging in XBMC, press each of those buttons several times, exit XBMC and examine your debug log (wiki) (xbmc.log) to see if XBMC even recognizes those buttons and, if so, how XBMC identifies them.
When repetingy clicking on those buttons, this is what showed in the logfile (multiple times of coarse):

09:04:37 T:6544 DEBUG: WinEventsWin32.cpp: APPCOMMAND 2
09:04:37 T:6544 DEBUG: CApplication::OnAppCommand: unknown appcommand 2

09:04:39 T:6544 DEBUG: WinEventsWin32.cpp: APPCOMMAND 1
09:04:39 T:6544 DEBUG: CApplication::OnAppCommand: appcommand 1, trying action Back
09:04:39 T:6544 DEBUG: CGUIWindowManager:TonguereviousWindow: Deactivate


Just for the heck of it, I dug out an old USB wheel mouse and hooked it up to my laptop running XBMC Eden on Ubuntu 12.04. I added mouse wheel assignments to Volume Up/Down in the <FullscreenVideo> stanza of mouse.xml and was able to use the wheel to change volume while watching a video. One issue I noticed was that even the slightest mouse movement would bring up the video OSD overlay at the bottom of the screen and then the wheel would act as Scroll Forward/Backward instead of changing the volume. I remedied that by changing <mousemove> to "noop" in the <FullscreenVideo> section.

Here's my mouse.xml, which is just the default file with the addition of the <FullscreenVideo> stanza:

Code:
<keymap>
  <global>
    <mouse>
      <leftclick>leftclick</leftclick>
      <middleclick>middleclick</middleclick>
      <rightclick>rightclick</rightclick>
      <doubleclick>doubleclick</doubleclick>
      <wheeldown>wheeldown</wheeldown>
      <wheelup>wheelup</wheelup>
      <mousedrag>mousedrag</mousedrag>
      <mousemove>mousemovel</mousemove>
    </mouse>
  </global>
  <SlideShow>
    <mouse>
      <leftclick>Pause</leftclick>
      <rightclick>PreviousMenu</rightclick>
      <wheelup>PreviousPicture</wheelup>
      <wheeldown>NextPicture</wheeldown>
    </mouse>
  </SlideShow>
  <FullscreenVideo>
    <mouse>
      <mousemove>noop</mousemove>
      <wheeldown>VolumeDown</wheeldown>
      <wheelup>VolumeUp</wheelup>
    </mouse>
  </FullscreenVideo>
</keymap>
This works for you?

I've got three differences (see post 3 from 2013-01-05 08:56 )
(I put your scrip and mine back to back)

<middleclick>middleclick</middleclick> = <middleclick>ToggleFullScreen</middleclick>

and I don't have:
the slideshow part and the <mousemove>noop</mousemove>

For the rest it's the same. What magical mouse do you have? Or might it be different for Ubuntu? I use W7.......

edit:
Well I found it, the <mousemove>noop</mousemove> is the vital part.

I didn't understand you right, when the video OSD overlay is visible the scroll doesn't work, when it's gone the volume is changed. The mouse actions for the video OSD overlay get priority.

Thanks for helpin me out, I really appriciate it.
Yes, it works for me.

The <slideshow> stanza is irrelevant. I just left the default mouse.xml intact and added the <FullscreenVideo> stanza.

The fact that the wheel mapping worked for you in the <global> but not in <FullscreenVideo> seemed odd to me. That's why I decided to run my own test. Maybe your text editor is adding some non-visible formatting characters that's preventing that stanza from being read properly? Try renaming your mouse.xml to mouse.xml.hold. Create a new mouse.xml and copy and paste the contents of my code block above. See if that works.

Another thing that seemed odd is that you never commented on the video OSD popping up. I found it very difficult to keep my mouse perfectly stationary so as not to cause this to appear. That's why I had to "noop" mousemove. Are you using a trackball or touchpad that is not sensitive to movement? I was using a basic Logictech USB wheel mouse for my test.
I just unplugged my mouse and used the touchpad on my laptop for control. I am able to use the scroll area of my touchpad to change volume while watching a video. So, I don't think the type of mouse is significant, as long as it has the hardware capability to scroll like a mouse wheel.
I use my mouse as remote control so indeed the video OSD kept popping up; which is a bit irritating. But except from the flickering pausebutton when scrolling nothing happened.

I concluded that scrolling wasn't assigned in <fullscreenvideo> and I didn't think that the OSD was of influence.

But now everything is working as wished.