INTERACT FORUM

Please login or register.

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

Author Topic: Windows Media Key  (Read 8585 times)

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Windows Media Key
« on: December 06, 2013, 02:00:42 pm »

I was wondering if the behavior of the Media Key is system-set, or if it's up to you.
 
When I hit the Media Key on my keyboard right now, it will launch Media Center if it's not already running.
But if Media Center is in the background, it is not given focus, the key doesn't seem to do anything.
 
Would it be possible for Media Center to take focus if it's running in the background and the key is pressed?
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Windows Media Key
« Reply #1 on: December 13, 2013, 05:23:51 am »

I don't know if the media center button is the same as the media key on the keyboard, but with the remote button MC is brought to the foreground if its running, or returns to the homescreen, etc.

Do you have a remote to test that? If its the same it may be something on your system, there was once a problem with other applications 'stealing' certain keys before they reached MC.
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Windows Media Key
« Reply #2 on: December 13, 2013, 05:34:11 am »

I don't know if the media center button is the same as the media key on the keyboard, but with the remote button MC is brought to the foreground if its running, or returns to the homescreen, etc.
I'm not sure, but I don't think it is. I'm remapping one of the keys on my keyboard to “App: Media Select (E0_6D)” in SharpKeys.

Do you have a remote to test that? If its the same it may be something on your system, there was once a problem with other applications 'stealing' certain keys before they reached MC.
I don't. I would like to have a remote that can control my TV, DAC, and Media Center, but I haven't found anything that I like. They all have far too many buttons, and a layout that's not very useful. This is basically what I'm looking for, but I don't think it's programmable.
Logged

Arindelle

  • Citizen of the Universe
  • *****
  • Posts: 2772
Re: Windows Media Key
« Reply #3 on: December 16, 2013, 07:24:50 am »

Have you heard about this. Flirc ? A friend uses this and its cross platform, he seems to think its great - he uses his fancy high end audio looking remote for everything. http://flirc.tv/product/flirc/

From my gaming days take with a grain of salt ... certain gaming mice have interfaces that allow you to do all sorts of things and with different profiles -- most of the time I used this for loading addons, changes to sensitivity on the fly, etc. But, if you have the mouse drivers installed, you can use this to load different devices,  controllers etc  with mapped hot keys for each. Probably would work with a remote if seen as a device but is complicated (and the mouse would have to be connected to a USB port.  Unless you are a hard core player with 80 euro+ gaming mice already, and then you know what I'm talking about, I'd leave this suggestion alone^^).
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Windows Media Key
« Reply #4 on: December 16, 2013, 07:42:08 am »

Have you heard about this. Flirc ? A friend uses this and its cross platform, he seems to think its great - he uses his fancy high end audio looking remote for everything. http://flirc.tv/product/flirc/
I have, but it doesn't really work for me. I'm looking for a single remote which can control my TV, DAC, and Media Center.
 
If I did not currently have a Sony TV, I would probably buy something like that along with this Sony remote, and use it to control Media Center.
 
The remote likely shares at least some IR codes with my current TV though, so it would not be possible to use with Media Center. (because button presses will be sent to both the TV and PC at the same time)

From my gaming days take with a grain of salt ... certain gaming mice have interfaces that allow you to do all sorts of things and with different profiles -- most of the time I used this for loading addons, changes to sensitivity on the fly, etc. But, if you have the mouse drivers installed, you can use this to load different devices,  controllers etc  with mapped hot keys for each. Probably would work with a remote if seen as a device but is complicated (and the mouse would have to be connected to a USB port.  Unless you are a hard core player with 80 euro+ gaming mice already, and then you know what I'm talking about, I'd leave this suggestion alone^^).
My current solution is actually to use Xpadder and a wireless Xbox 360 controller as a remote.
It works reasonably well, but the problem is that it's completely unintuitive for anyone else to use, and powers off after 15 minutes of being idle.
 
If I'm in front of the PC, I just use the regular mouse interface.

I've tried apps like JRemote, but I really don't like touchscreen controls, or having to unlock a device, load an app, wait for it to connect, and then be able to control the PC.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5233
  • "Linux Merit Badge" Recipient
Re: Windows Media Key
« Reply #5 on: December 16, 2013, 08:00:21 am »

I was wondering if the behavior of the Media Key is system-set, or if it's up to you.
 
When I hit the Media Key on my keyboard right now, it will launch Media Center if it's not already running.
But if Media Center is in the background, it is not given focus, the key doesn't seem to do anything.
 
Would it be possible for Media Center to take focus if it's running in the background and the key is pressed?

Have you tried F11?  F11 is the same as the green button on a standard WMC remote, and should foreground MC.  You could probably re-map it and do what you need.
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Windows Media Key
« Reply #6 on: December 16, 2013, 08:04:08 am »

Have you tried F11?  F11 is the same as the green button on a standard WMC remote, and should foreground MC.  You could probably re-map it and do what you need.
Surely that can't be right. F11 is used in a huge number of applications to toggle fullscreen mode on and off.
I'm hoping that it would be a simple fix for the standard "Media Key" give Media Center focus. It will launch MC and give it focus if it's not open, but if it's already open Media Center does not respond.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Windows Media Key
« Reply #7 on: December 16, 2013, 08:12:24 am »

I've addressed this before.  Hold on, I'll find the thread.

Okay.  Found it.  Read the whole thread, as it has all the details:
http://yabb.jriver.com/interact/index.php?topic=84541.0

Basically, you want:

mc19.exe /MCC 22001,0

But you need to combine this with a mc19.exe /Start and/or mc19.exe /Mode command as well, from a script, to launch/bring-forward MC.  If you use home automation software (EventGhost or Girder or something similar), that can respond to events conditionally depending on what is on-top, then it is easier to deal with, but you can get it pretty nice anyway.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5233
  • "Linux Merit Badge" Recipient
Re: Windows Media Key
« Reply #8 on: December 16, 2013, 09:29:30 am »

Surely that can't be right. F11 is used in a huge number of applications to toggle fullscreen mode on and off.
I'm hoping that it would be a simple fix for the standard "Media Key" give Media Center focus. It will launch MC and give it focus if it's not open, but if it's already open Media Center does not respond.

It's correct as of build 67 (see below).  F11 in MC does what the green media button on the remote does, which includes foregrounding MC (at least in Win 7, I haven't tested on Win 8 ).

EDIT: Ok, just tested, does not work as expected in Win 8, at least on my setup (so it's not interchangeable with the green remote key in all cases).  Sorry for the red herring.  

Quote
19.0.67 (10/31/2013)
[...]
3. Changed: Switched F11 and Shift+F11 so that F11 is equivalent to the green button on an MCE remote (and shift F11 will loop including Standard View).
[...]
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Windows Media Key
« Reply #9 on: December 16, 2013, 09:33:58 am »

Yeah.  That change made me reassign my standard remote keys (because I like having the version that includes Standard View).
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Windows Media Key
« Reply #10 on: December 16, 2013, 10:14:11 am »

When Media Center is open and in focus, F11 takes me to Theater View.
When Media Center is running in the background, hitting F11 in other applications such as a web browser makes them switch to fullscreen mode and does nothing to MC.
 
The Media Key (not the green button on a media remote) is a standard Windows function which launches or switches to the default system media player. (Media Center)
It will launch Media Center if it's not already running, but does not restore or switch to Media Center when another application is being used and MC is behind other windows or minimized in the taskbar.
I'm fairly sure other players will take focus if you hit the Media Key.
 
I would really prefer not to install and run another third party utility for this, if at all possible.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5233
  • "Linux Merit Badge" Recipient
Re: Windows Media Key
« Reply #11 on: December 16, 2013, 10:33:57 am »

When Media Center is open and in focus, F11 takes me to Theater View.
When Media Center is running in the background, hitting F11 in other applications such as a web browser makes them switch to fullscreen mode and does nothing to MC.
 

Sorry about that, that's what I was saying in my Edit above.  The green button on a WMC remote and F11 apparently do not work the same in all cases.  The green remote button will switch to theater view, but if theater view is already up and not in focus, it foregrounds it.  The green remote button doesn't care what's in focus, media center comes to the top.  F11 does not seem to work exactly the same as the green button in all circumstances (it did foreground MC in Win 7 when I tried it last night, although I didn't have a browser up at the time). 

It is a little odd that they didn't assign the keyboard media button as the "equivalent" to the media button on the remote.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Windows Media Key
« Reply #12 on: December 16, 2013, 10:43:44 am »

I would really prefer not to install and run another third party utility for this, if at all possible.

Well... Are you trying to use a button on a keyboard that can or cannot be remapped?

If you can remap it, and you can remap it to launch any BAT or EXE you want, then use the script I posted in that other thread:

Code: [Select]
<package>
   <job id="vbs">
      <script language="VBScript">
'Create our handy dandy Shell object
set WshShell = WScript.CreateObject("WScript.Shell")

'Toggle Theater View Mode
WshShell.Run "mc19.exe /MCC 22001,0"

WScript.Sleep 500

'Make sure MC is on Top or Launch it
WshShell.Run "mc19.exe /Start"
      </script>
   </job>
</package>

It isn't perfect, as if you use it to automatically launch MC if it isn't currently running then it will launch to whatever mode MC starts in by default (under Options > Startup > Startup Interface > Mode).  However, any subsequent keypresses will do the "Theater View Toggle" (F11) and bring MC to the foreground if needed.

That's the only difference between using that script, and using "better" Home Automation mapping software (the version of that I use at home on my remote can do "logic" depending on whether MC is running at the time or not, so it can be a Theater View specific launcher, even though I have MC set to launch to Standard View by default).

Hope this makes more sense.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Windows Media Key
« Reply #13 on: December 16, 2013, 11:02:02 am »

Well... Are you trying to use a button on a keyboard that can or cannot be remapped?
SharpKeys just remaps via the Registry so there are no utilities or drivers running.
My keyboard has a function layer of keys which I never used, so I remapped them to work as media keys. (play/pause, next/prev, stop, and "media")
 
 
What I'm wanting is to be able to switch from a fullscreen application (e.g. a game) to Media Center by pressing the key.
It works the first time, but once Media Center is already running, it no longer responds to the key.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Windows Media Key
« Reply #14 on: December 16, 2013, 11:38:42 am »

So, you can't map them to point to a script, only to another keyboard combo?
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Windows Media Key
« Reply #15 on: December 16, 2013, 01:00:38 pm »

So, you can't map them to point to a script, only to another keyboard combo?
As far as I know, that's all the registry allows.
 
I was hoping this was a simple "oh, we forgot to check for that while we're already running" thing which would be an easy fix.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Windows Media Key
« Reply #16 on: December 16, 2013, 01:32:35 pm »

Unfortunately, I think the issue is more fiddly than you were thinking.  The issue is that MC doesn't respond to keyboard shortcuts at all when it isn't the foreground application.  This is to be expected, and to do otherwise would be bad behavior.

But if all your keyboard remapper can do is generate keyboard presses (and it looks like SharpKeys is really a remapper, as it can't even do things like Control-C) then you're pretty much stuck.

I'd look into a slightly more useful keyboard remapper, if you really want this functionality.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Windows Media Key
« Reply #17 on: December 16, 2013, 01:48:25 pm »

Unfortunately, I think the issue is more fiddly than you were thinking.  The issue is that MC doesn't respond to keyboard shortcuts at all when it isn't the foreground application.  This is to be expected, and to do otherwise would be bad behavior.
This is a system key though, just like the windows key or print screen etc.
It's not a function of a keyboard that's using custom drivers for its own app launcher buttons.
 
Maybe it's not Media Center's fault at all, and that's how it is supposed to work, but it seems fairly useless if it only launches the app once, rather than switching to it when it's running, which is why I thought it might be an issue with Media Center.
 
The system play/pause, next/prev, and stop commands which I have mapped to other keys work correctly whether MC has focus or not.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Windows Media Key
« Reply #18 on: December 16, 2013, 02:02:58 pm »

Yeah, those are all special Media Keys defined by Windows, and MC handles them properly.  I don't think there's anything JRiver can do to better handle the "launcher" key, though as that is controlled by Windows.

I could be wrong on that last point, but the JRiver folks would have to comment.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Windows Media Key
« Reply #19 on: December 16, 2013, 02:29:45 pm »

One question: How do you define which application gets launched when you press that Media Launcher key?

Does it just happen automatically when you register certain filetype extensions or something?  Or can you define the "media player" application explicitly somewhere?

If the latter, then you could assign either:

mc19.exe /Start

As the "media player" itself, and then that should work to pull MC forward when it is running, and launch it when it isn't.  Or, if you can, you could try assigning my script (from above) to as the Media Player, which should make it launch too (but could break other stuff, I suppose).

Worth a shot.  I'm not sure how those work by default, as I don't have one of those keyboards anymore. I use an Apple Extended Aluminum keyboard at home, and it has the Play/FF/RW keys, which work fine, but it doesn't have a "media player launcher" key of any kind.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Windows Media Key
« Reply #20 on: December 16, 2013, 02:47:32 pm »

I don't know how it determines what the default media player is, or what it's launching that only works with Media Center once (which makes me think it is a Media Center issue) but I've done some digging around, and it can be configured in the registry under:
 
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\16
 
If it doesn't already exist (it was empty for me) add a new string called ShellExecute and it will launch whatever you specify. (in this case mc19.exe /Start)
 
 
So thanks for your help/patience in getting this to work.
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Windows Media Key
« Reply #21 on: December 26, 2013, 09:09:10 am »

For future reference, here's a list of all the AppCommand values:
 
Code: [Select]
  1  APPCOMMAND_BROWSER_BACKWARD                    
   2  APPCOMMAND_BROWSER_FORWARD                    
   3  APPCOMMAND_BROWSER_REFRESH                    
   4  APPCOMMAND_BROWSER_STOP                        
   5  APPCOMMAND_BROWSER_SEARCH                      
   6  APPCOMMAND_BROWSER_FAVORITES                  
   7  APPCOMMAND_BROWSER_HOME                        
   8  APPCOMMAND_VOLUME_MUTE                        
   9  APPCOMMAND_VOLUME_DOWN                        
  10  APPCOMMAND_VOLUME_UP                          
  11  APPCOMMAND_MEDIA_NEXTTRACK                    
  12  APPCOMMAND_MEDIA_PREVIOUSTRACK                
  13  APPCOMMAND_MEDIA_STOP                          
  14  APPCOMMAND_MEDIA_PLAY_PAUSE                    
  15  APPCOMMAND_LAUNCH_MAIL                        
  16  APPCOMMAND_LAUNCH_MEDIA_SELECT                
  17  APPCOMMAND_LAUNCH_APP1                        
  18  APPCOMMAND_LAUNCH_APP2                        
  19  APPCOMMAND_BASS_DOWN                          
  20  APPCOMMAND_BASS_BOOST                          
  21  APPCOMMAND_BASS_UP                            
  22  APPCOMMAND_TREBLE_DOWN                        
  23  APPCOMMAND_TREBLE_UP                          
  24  APPCOMMAND_MICROPHONE_VOLUME_MUTE              
  25  APPCOMMAND_MICROPHONE_VOLUME_DOWN              
  26  APPCOMMAND_MICROPHONE_VOLUME_UP                
  27  APPCOMMAND_HELP                                
  28  APPCOMMAND_FIND                                
  29  APPCOMMAND_NEW                                
  30  APPCOMMAND_OPEN                                
  31  APPCOMMAND_CLOSE                              
  32  APPCOMMAND_SAVE                                
  33  APPCOMMAND_PRINT                              
  34  APPCOMMAND_UNDO                                
  35  APPCOMMAND_REDO                                
  36  APPCOMMAND_COPY                                
  37  APPCOMMAND_CUT                                
  38  APPCOMMAND_PASTE                              
  39  APPCOMMAND_REPLY_TO_MAIL                      
  40  APPCOMMAND_FORWARD_MAIL                        
  41  APPCOMMAND_SEND_MAIL                          
  42  APPCOMMAND_SPELL_CHECK                        
  43  APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE  
  44  APPCOMMAND_MIC_ON_OFF_TOGGLE                  
  45  APPCOMMAND_CORRECTION_LIST                    
  46  APPCOMMAND_MEDIA_PLAY                          
  47  APPCOMMAND_MEDIA_PAUSE                        
  48  APPCOMMAND_MEDIA_RECORD                        
  49  APPCOMMAND_MEDIA_FAST_FORWARD                  
  50  APPCOMMAND_MEDIA_REWIND                        
  51  APPCOMMAND_MEDIA_CHANNEL_UP                    
  52  APPCOMMAND_MEDIA_CHANNEL_DOWN                  
  53  APPCOMMAND_DELETE                              
  54  APPCOMMAND_DWM_FLIP3D
Logged
Pages: [1]   Go Up