MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Community Skins and Plugins » Plugins


Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here.

Reply
 
Thread Tools Display Modes
Old 2007-07-20, 13:14   #1 (permalink)
Portal Member
 
Join Date: Aug 2006
Location: Rotterdam, NL
Age: 33
Posts: 18
Thanks: 0
Thanked 6 Times in 2 Posts


Post Generic Keyboard/Remote Input Plugin

New version 1.1.0.0 now available.

New in this version is enhanced plug-in configuration support; it is now possible to add/modify/delete button definitions. This means the keyboard.xml file no longer needs to be edited by hand. This new functionality also includes learning capabilities (e.g. just press the key that you want to learn), and auto-creation of a new mapping file if none exists yet.


I've created a generic MediaPortal keyboard input plug-in. Using a similar mapping mechanism as used for remote controls, one can map arbitrary key presses to MediaPortal actions, windows, etc.

As opposed to the regular MediaPortal key mapping mechanism this plug-in takes the Control, Alt and Shift modifier keys into account. This has several advantages, for example it allows you to map all of the buttons on a remote control that acts like an HID keyboard and uses modifiers to distinguish between buttons (e.g. like Asus S-Presso front panel remote control, which sends Ctrl-B, Ctrl-Shift-B and Ctrl-Alt-Shift-B for Replay, Rewind and Repeat buttons respectively). Also you have more key combinations to choose from.

The plugin is available on the MediaPortal website: http://www.team-mediaportal.com/file...rdInputPlugin/. If you have any questions or comments please post them here.

Some remarks about this plugin:
  • Read the included documentation before using this plugin!
  • You should make sure that a specific keypress is handled either by this plugin or by the regular MediaPortal keyboard handler, but not both. Otherwise a keypress may be handled twice, resulting in strange behaviour. Please note that the regular MediaPortal keyboard handler disregards any key modifiers (Ctrl, Alt, Shift) so may see Ctrl-B, Ctrl-Alt-B and B all as the same key. To be on the safe side one should remove all mappings from the MediaPortal keymap.xml file when using this plugin, and let this plugin handle all key presses.
  • This plugin was primarily developed for supporting the Asus S-Presso front panel remote control, but it may be useful in other cases as well.
  • The supplied example keyboard.xml file for the Asus S-Presso remote contains a small error; the code for the Eject button is set to 00011069, this should be 11069 (e.g. without prefix 000). (Fixed in version 1.1.0.0)

If anybody wants to enhance this plugin, please feel free to do so (but please inform me and others via this thread so work is not done twice). Some enhancement ideas:
  • Add some utility function to copy/move definitions from MediaPortal keymap.xml to keyboard.xml
  • Add more example keyboard.xml files for additional remotes and other functionality
  • Document other uses of this plugin

Last edited by rsenden; 2007-07-24 at 15:56. Reason: new version
rsenden is offline   Reply With Quote
5 Users Say Thank You:
Old 2007-07-20, 15:09   #2 (permalink)
Portal Member
 
Join Date: Nov 2006
Age: 96
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts


Default

that sounds cool.
i have a xpc-rc01 remote wich acts like a wireless keyboard (HID)
and sends keystrocks like ctrl+p,etc.
would it work for me?
Mike69 is offline   Reply With Quote
Old 2007-07-20, 17:20   #3 (permalink)
Portal Member
 
Join Date: Aug 2006
Location: Rotterdam, NL
Age: 33
Posts: 18
Thanks: 0
Thanked 6 Times in 2 Posts


Default

Hello Mike,

I think the plugin should be usable for your remote as well if it behaves like an HID keyboard. Just have a look at it when it becomes available in the input plugins downloads section. If you are able to make it work with your remote, can you please send me the Keyboard.xml file so I can include that as an example in the distribution? Thanks in advance.

Kind regards,
Ruud.
rsenden is offline   Reply With Quote
Old 2007-07-22, 16:07   #4 (permalink)
Portal Member
 
Join Date: Nov 2006
Age: 96
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts


Default

of course i can...
when do you think it will be fineshed?
Mike69 is offline   Reply With Quote
Old 2007-07-22, 19:24   #5 (permalink)
Portal Member
 
Join Date: Aug 2006
Location: Rotterdam, NL
Age: 33
Posts: 18
Thanks: 0
Thanked 6 Times in 2 Posts


Default

Hi Mike,

It's already available: http://www.team-mediaportal.com/file...rdInputPlugin/

Kind regards,
Ruud.
rsenden is offline   Reply With Quote
This User Say Thank You:
Old 2007-07-23, 15:06   #6 (permalink)
Portal Member
 
Join Date: Oct 2006
Posts: 102
Thanks: 1
Thanked 3 Times in 3 Posts

Country:


Default

Perfect job :-)

with this plugin I definitly uninstall old My Keys. Now I can normal use keyboard without interference with My Keys.

Thanx a lot :-)

P.S.: Here is file with same functionality like MyKeys. Old Shortcuts are replaced with combination Ctrl+Alt.

For example - My music was "i" in MyKeys now is "Ctrl+Alt+i".
Attached Files
File Type: xml Keyboard.xml (2.5 KB, 247 views)

Last edited by stanik; 2007-07-23 at 15:11.
stanik is offline   Reply With Quote
This User Say Thank You:
Old 2007-07-24, 15:58   #7 (permalink)
Portal Member
 
Join Date: Aug 2006
Location: Rotterdam, NL
Age: 33
Posts: 18
Thanks: 0
Thanked 6 Times in 2 Posts


Default

Hi all,

A new version 1.1.0.0 is now available, see the opening post of this thread. This version allows for easier configuration of button definitions (no need for manually editing keyboard.xml anymore), including keycode learning mode.

Regards,
Ruud.
rsenden is offline   Reply With Quote
Old 2007-08-06, 17:07   #8 (permalink)
bfj
Portal Member
 
Join Date: Jan 2007
Posts: 42
Thanks: 8
Thanked 3 Times in 3 Posts

Country:


Default

I've just got round to setting this up and it works a treat

Thanks!
bfj is offline   Reply With Quote
Old 2007-08-18, 00:32   #9 (permalink)
Portal Member
 
Join Date: Apr 2006
Age: 32
Posts: 243
Thanks: 2
Thanked 2 Times in 1 Post

Country:


Default

Is it possible to add quick jump directly to a certain plugin. I have specially My TV Series plug-in in mind. I have been cycling through possible window but I can not find it.
Johan is offline   Reply With Quote
Old 2007-08-18, 12:24   #10 (permalink)
Portal Member
 
Join Date: Aug 2006
Location: Rotterdam, NL
Age: 33
Posts: 18
Thanks: 0
Thanked 6 Times in 2 Posts


Default

Hi Johan, the plugin re-uses the existing MediaPortal remote button/input mapping mechanism which AFAIK doesn't support the functionality that you requested. Currently I do not have plans to replace the MediaPortal input mechanism with my own version, so unless somebody else implements this (either in MediaPortal itself or in the KeyboardInputPlugin) this functionality will not be supported in the near future.

There is a workaround though; add the button and map it to some arbitrary window, and then manually change the keyboard.xml file. For the given button mapping you will have to modify the value of the cmdproperty attribute to the window/plugin-id of your choice (the window id can be found by looking at the source of the plugin) . Be wary though; your keyboard.xml configuration file will be deleted when you press the 'Update Mapping' button in the KeyboardInputPlugin configuration after making such changes, as the MediaPortal input mapping mechanism doesn't understand this.

So the correct workaround would be to create all mappings that you want using the setup screens, as far as possible. Then make a backup (1) of your InputDeviceMappings\custom\keyboard.xml file, then manually change any mappings that you want, and make a backup (2) of that file again. Should you ever want to modify the mapping again using the setup program, replace the InputDeviceMappings\custom\keyboard.xml file with backup (1), make your changes, and re-apply all manual changes again.

Kind regards,
Ruud.
rsenden is offline   Reply With Quote
Reply

Bookmarks

Tags
generic, input, keyboard or remote, plugin

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Generic Streaming Media Plugin or protocol system... simex Improvement Suggestions 3 2006-10-20 04:28
Virtual keyboard with cell phone input style masali Improvement Suggestions 1 2006-03-28 15:50
Clan Messages Reader plugin...generic layout for every skin? BigCheese Plugins 6 2006-02-15 23:33
Using generic remote as MCE remote anything General Support 7 2005-12-12 08:47
Skinnable virtual keyboard and maybe predictive input Smirnuff General Development (no feature request here!) 32 2005-04-23 13:05


All times are GMT +1. The time now is 04:31.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress