Jump to content
Flirc Forums

Flirc with a (non-HT)PC and Vizio M series 2014 remote


daniel87
 Share

Recommended Posts

 
 

Hi,

 

I came across Flirc by chance on the interwebz and I'm interested. Here's my setup, wondering if Flirc makes sense here:

- General purpose PC with an Nvidia GPU: DVI port connected to a regular PC monitor, and HDMI port connected to a Vizio M series 2014 TV. Windows is running in extended desktop mode. Regular Windows desktop is shown on the DVI monitor, and XBMC is shown on the secondary monitor (TV).

- Remote is the remote that came with the TV; has a keyboard on the back I'd like to use with Flirc if possible

 

Here are my questions:

  1. I read that Flirc is detected as a keyboard input. Can I set it so input from Flirc goes to XBMC only, rather to where Window's focus is? Here's a use case: I'm watching XBMC on the TV with Flirc. I go to my PC to browse the internet for a bit using M&K that are plugged in. I come back to the TV - I don't want input from Flirc to suddenly go to my browser rather than XBMC.
  2. If I now switch the TV from HDMI input (XBMC on the PC) to Netflix running on the TV, is it possible to set it so that Flirc ignores presses on the remote? That is, when switching to the TV's Netflix, I want "right" to affect Netflix on the TV only, not XBMC that's still running on the PC but isn't being displayed anywhere.
  3. Can I train Flirc to use the full keyboard on the remote?

Thanks for any input.

 
Link to comment
Share on other sites

Hi,

 

1. Short answer: with just Flirc, no.

Long answer: Windows doesn't have ability to easily recognize on which keyboard a key was pressed. This means that Flirc, which works like a keyboard, can only send key presses to currently focused application. There are some work-arounds but they are not reliable. There are 2 APIs in Windows for key presses. First API allows to capture key press so it's not visible by other apps in the system. Second one allows detecting key press source (so app can recognize that it came from Flirc) but it cannot capture the key so it is still sent to the focused app. There where some projects that tried to connect both APIs but it is VERY unreliable.

 

There is another way but it's not easy and not officially supported. There is a way to set up the Flirc not to use normal keyboard codes but a more generic HID codes from a different HID table. This allows to go around default keyboard filter in Windows allowing some more advances usages. I'm using Flirc that way but you need some software to catch HID codes from Flirc and do something based on them. For that I'm using GhostEvent with a little modified HID plugin (I've modified it myself as there was some problem with default plugin). This method is hard to set up because it involves editing config file saved from Flirc. I would probably not recommend this method because it is possible it can be broken by some future Flirc firmware upgrade.

 

2. Flirc wouldn't know when you are using Netflix on your TV. Actually nothing on your PC would know that unless your TV can somehow provide it with such info. You would still need some way to decide if you want to accept Flirc input or not.

 

3. It can learn up to about 169 remote buttons and assign them to key combinations (a key combo is a zero or more key modifiers - like shift, ctrl - and exactly one normal key). But it also depends on things like protocol used by the remote/keyboard as not all protocols work good with Flirc.

Edited by yawor
Link to comment
Share on other sites

 
 
 
 

Thanks for taking the time to go walk me through the problem.

 

Here are a couple of follow up questions in an attempt to work around the issues you described:

 

Regarding problem 1:

 

a ) Can I set up Flirc such that pressing a button runs a script in addition to pressing a keyboard button?

What I'm thinking is that in addition to forwarding "left", "right", as keyboard events, Flirc also runs a script (AutoIt, AutoHotkey, etc.) first to change focus to XBMC if that isn't already the case. The overhead from running the script should be small enough.

 

b ) If it's not possible for Flirc to associate 2 actions with 1 button press:

--> Can I train Flirc to associate a button press with *just* running a script? Either directly or through Windows global hotkeys?

--> If the above is true, then I see 2 options: 1) Dedicate a single remote button to running the focus-shifting script, or 2) do the focus change *and* the action button press ("left", "right", etc.) in the script, which is triggered by Flirc.

 

Think any of this is doable?

 

Regarding problem 2:

 

Is there a way to associate a button press with enabling/disabling Flirc?

What I'm thinking is using the Netflix button on my remote to tell Flirc "ignore any further button presses", and a second dedicated button on my remote to tell it "resume forwarding remote presses".

If that's not possible then I can get fancier and wrap all the keyboard press actions in scripts, and associate button presses with those scripts through Flirc (if possible, see above). Then use 2 buttons on the remote to tell the scripts (instead of Flirc) to allow/disallow button presses.

 

Maybe I'm trying too hard and there's an easier single-remote solution (other then CEC-USB adapter, which is $50, or a dedicated CEC-enabled XBMC host), let me know.

Edited by daniel87
Link to comment
Share on other sites

1. As long as you can associate script with a keystroke it will work. But remember that you can't associate the script with keystrokes from the Flirc only so pressing the same key combo on a normal keyboard with also run the script.

2. You can't disable Flirc, but you can always make a script that will capture all mapped keystrokes and block them. This will of course also disable the same keystrokes on a normal keyboard.

 

If you want the more advanced solution which I'm using I can help you with the setup, but it's on your own risk. Also this method requires that the GhostEvent is always running in the background as in my solution Flirc no longer acts as a keyboard. If you are interested please contact me using private message when you decide to buy Flirc because I would like to keep it not public for now (I need to test it more and wait for Jason's firmware changes to see if it breaks it or not).

Edited by yawor
Link to comment
Share on other sites

I ended up buy Flirc and followed this guide: 

Works great. Solved:

Problem 1 - programmed Flirc keystrokes as CTRL-ALT-SHIFT-<some key>. Odd enough combination to not conflict with anything else. (If this does conflict and becomes annoying, will contact you about your HID solution, yawor ;) ) Then I mapped these keys in Event Ghost to correspond to XBMC commands through the Event Ghost plugin.

Problem 2 - Programmed my Netflix remote button to tell Event Ghost to disable the XBMC events. When I switch back to HDMI input on my TV (i.e., PC running XBMC), I just have to press record on my remote (unused otherwise) to re-enable XBMC events.

Problem 3 - haven't walked through the solution here yet, but it should be possible to solve this in a similar manner.

Extra - pressing another unused button on my remote launches XBMC, and/or brings it to the foreground, and/or maximizes it (all the states in which I might leave XBMC when walking away from my PC).

 

Next up is programming another remote button to launch Steam in Big Picture mode and switch default audio output to HDMI (shortcoming of Steam, unfortunately, but I have a script ready for this), and I'll be all set :)

 

Only negative feedback I have for Flirc is that it wasn't exactly plug n play. When I first plugged it in I was able to program it okay, but it wouldn't forward any events to Windows (Windows 7, x64) afterwards. Looked around a bit on the forums and someone suggested unplugging the regular keyboard and Flirc, then plugging in Flirc followed by the regular keyboard. That fixed things, and Flirc worked smoothly afterwards. The range on it is great too... really an great device.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

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

Guest
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.

 Share

×
×
  • Create New...