[RELEASE] Flix2Kodi - Just another Netflix-Addon
(2016-01-05, 01:55)Jeremy White Wrote:
(2016-01-05, 01:12)logi85 Wrote: For Linux it seams that jwhite has a working solution. (https://github.com/logi85/plugin.video.f.../issues/13) just waiting for pull request so I could integrate.
Hope someone will find a good solution for windows too.

I'll submit a proper pull request that does this a bit more cleanly when you install the plugin on linux, but it is school holiday week here so I am off on a road trip. I'll submit a proper pull request after this week but I feel bad that it will take me so long.

I tried a good half dozen ways to try to get this to work on a app-only basis and found drawbacks and corner cases that made each of those impractical. So the solution is to map the actual *keyboard* during the session running chrome and when chrome exits, map them back. Yes, it's a bit of a hack but it works flawlessly (and after trying all the other cleaner solutions I think this is the only painless and flexible way.) I can do this in the actual browser launching script in a temporary and clean way.

In the mean time if you hack a bit of linux you can follow my solution here :

you can install xbindkeys using apt-get

Modify your launchBrowser.sh file to start xbindkeys right before chrome is launched :

Here is the snippet:

>xbindkeys &
># notice the ampersand to send google chrome into back ground so that the script continues and we execute the xdotool below
>/usr/bin/google-chrome --start-maximized --disable-translate --disable-new-tab-first-run --no-default-browser-check --no-first-run --kiosk "$url" &


And then at the end of the file kill xbindkeys after chrome exits :

(last line in launchBrowser.sh)
>killall -KILL xbindkeys

Ok -- now you need a keyfile to control the mappings.

When you run xbindkeys it will create a .xbindkeysrc file usually in your root directory (the same one as the .kodi directory resides in)

Here is mine. It enables pause, rewind, forward, exit ... and most important for me the volume keys on my proper HTPC remote.

###########################
# xbindkeys configuration #
###########################
#
# Version: 0.1.3
#
# If you edit this, do not forget to uncomment any lines that you change.
# The pound(#) symbol may be used anywhere for comments.
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
#
# List of modifier (on my keyboard):
# Control, Shift, Mod1 (Alt), Mod2 (NumLock),
# Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#
# Another way to specifie a key is to use 'xev' and set the
# keycode with c:nnn or the modifier with m:nnn where nnn is
# the keycode or the state returned by xev
#
# This file is created by xbindkey_config
# The structure is :
# # Remark
# "command"
# m:xxx + c:xxx
# Shift+...




#keystate_numlock = enable
#keystate_scrolllock = enable
#keystate_capslock = enable



#Exit
"xdotool search --onlyvisible --class "Chrome" windowfocus key 'Alt+F4'"
m:0x0 + c:22

#VolumeUp
"xdotool search --onlyvisible --class "Chrome" windowfocus key 'Up'"
m:0x0 + c:123
# XF86AudioRaiseVolume

#VolumeDown
"xdotool search --onlyvisible --class "Chrome" windowfocus key 'Down'"
m:0x0 + c:122
# XF86AudioLowerVolume

#Pause
"xdotool search --onlyvisible --class "Chrome" windowfocus key 'Return'"
m:0x0 + c:172
# XF86AudioPlay

#rewind
"xdotool search --onlyvisible --class "Chrome" windowfocus key 'Shift+Left'"
m:0x0 + c:175
# Control+Shift + Control_L

#Forward
"xdotool search --onlyvisible --class "Chrome" windowfocus key 'Shift+Right'"
m:0x0 + c:216
# XF86AudioForward

#
# End of xbindkeys configuration
Hi, I will try to integrate in the next days. This script is for mce remote (and lirc if it sends these keys) right? I think about about a choice in settings to enable this settings, like choosing the browser.
Reply


Messages In This Thread
RE: [RELEASE] Flix2Kodi - Just another Netflix-Addon - by logi85 - 2016-01-05, 02:27
No access to TV show data - by seriousjohn - 2016-11-03, 19:01
Flix2kodi <crashed> - by Garri - 2016-01-08, 19:29
Logout Mark Read Team Forum Stats Members Help
[RELEASE] Flix2Kodi - Just another Netflix-Addon8