Moderator Control Panel ]

Editing Commands

Editing Commands

Postby PatrickORourke89 » Thu Aug 09, 2012 10:24 pm

is it possible (I'm certain it is) to edit the commands that the command sends, I notice in the inf file there seems to be a config which looks like you could change it, but I can't quite get my head around the format of the table, I have seen about the VHID Pro utility for editing these commands but i can't seem to find that anywhere?

For example, if i wanted the "Zoom" button to mimic the keyboard shortcut "Ctrl + Alt + X" what should the below be, this is my first attempt at it based on looking at other examples;

HKR,"DriverData","IR_Scancode_27", 0x00010001, 0x9d
;"Zoom" Ctrl + Alt + X
HKR,"DriverData","IR_Virtualcode_27", 0x00010001, 0x1158, 0x00
PatrickORourke89
 
Posts: 2
Joined: Thu Aug 09, 2012 5:28 am

Re: Editing Commands

Postby PatrickORourke89 » Fri Aug 10, 2012 7:45 am

Anybody?
PatrickORourke89
 
Posts: 2
Joined: Thu Aug 09, 2012 5:28 am

Re: Editing Commands

Postby steven » Fri Aug 10, 2012 10:32 am

Hi Patrick

You can see 6981's VHID driver file (tbs6981vhid.inf ),you can modify it as you want
take power as example:

This is the start key,like press keyboard to start MCE,
; 0x00x x x x xx
; |->ctrl key pressed flag
; |->shift key pressed flag
; |->Alt key pressed flag
; |->keyboard(1 for keyboard, 2 for system key)
; |->Virtualcode(refer to the USB HID usage table)

HKR,"DriverData","IR_Scancode_0", 0x00010001, 0x84
;"start" win + alt + enter
HKR,"DriverData","IR_Virtualcode_0", 0x00010001, 0x1001158, 0x00

0x84 is the remote value
0x58 = 88,you can see the pic 88's value ,it is the enter key

more example
HKR,"DriverData","IR_Scancode_1", 0x00010001, 0x80
;"Recall"
HKR,"DriverData","IR_Virtualcode_1", 0x00010001, 0x12a, 0x00

Recall like keyborad Backspace
0x2a = 42 you can see pic of 42's value,it is the Backspace key


So if you find some key is not right ,you can modify it by yourself

I give you a pdf file just see 54-60 pages.
https://hotfile.com/dl/166210456/a15ed43/hid_usage.pdf.html

This is a little complex ,Why you do not use WinLIRC ,which is very easy to set remote key. :)
Here you can get more information:
viewtopic.php?f=21&t=7665

Wish this can help you. : )

Kind Regards

steven
steven
 
Posts: 2239
Joined: Fri Aug 06, 2010 3:23 pm

Re: Editing Commands

Postby cia » Sat Jan 26, 2013 12:15 am

Hello Steven,

I'll get a 6981 a few days ago and I had some trouble on cofiguring the vhid.inf file...

first: there are only 30 scancodes - but the remote has 42 keys... this is not user friendly for guys who not familiar with WinLIRC or other...
second: in your post above (and the vhid.inf) you show the per-bit-explanation of the virtual keycode, but no reference for the WIN-key (Bit 6) - why not?
third: the bit 2 should set the system or keyboard table to use for the virtual key - it seems to do not so if you would set it to system command SLEEP (0xooooo282) it does an VOLdown send to windows ?!?
fourth: it says I can use internal or no table (IR_Configuration) whitch internal tables do you mean? and witch keys codes these tables uses?

really many questions but if you explain it to me, I will set up a working INF for Windows MCE witch you can use as an really remote incl. shutdown PC without going thru menues

regards,
Stefan
cia
 
Posts: 4
Joined: Thu Jan 24, 2013 3:35 am

Re: Editing Commands

Postby steven » Sat Jan 26, 2013 9:34 pm

Hi cia

For your question:
>first: there are only 30 scancodes - but the remote has 42 keys... this is not user friendly for guys who not familiar with WinLIRC or other...
we just configed the most usually used key for Windows Media Center. other keys we have not configed.
In the WinLIRC have all keys:
begin codes
POWER 0x84
MUTE 0x94
1 0x87
2 0x86
3 0x85
4 0x8B
5 0x8A
6 0x89
7 0x8F
8 0x8E
9 0x8D
0 0x92
* 0xD1
# 0xD2
CLEAR 0xD4
CH+ 0x96
CH- 0x91
VOL+ 0x93
VOL- 0x8C
RECALL 0x80
ZOOM 0x9D
FAV 0x95
UP 0x81
DOWN 0x88
LEFT 0x90
RIGHT 0x82
OK 0x99
MENU 0x9E
EXIT 0x9F
EPG 0x9C
PAUSE 0x98
SUB 0x97
SNAP 0x9A
MODE 0x9B
RECORD 0x83
RECODREDTV 0xDD
PLAY 0xDE
STOP 0xDC
REW 0xDB
FWD 0xDA
REPLAY 0xD9
SKIP 0xD8
end codes

>second: in your post above (and the vhid.inf) you show the per-bit-explanation of the virtual keycode, but no reference for the WIN-key (Bit 6) - why not?
Do you mean that you want to use WIN-Key?
HKR,"DriverData","IR_Scancode_0", 0x00010001, 0x84
;"start" win + alt + enter
HKR,"DriverData","IR_Virtualcode_0", 0x00010001, 0x1001158, 0x00
1 is for the WIN-Key

>third: the bit 2 should set the system or keyboard table to use for the virtual key - it seems to do not so if you would set it to system command SLEEP (0xooooo282) it does an VOLdown send to windows ?!?
130 82 Keyboard Locking Caps Lock12 √ ,82 is the Keyboard Locking Caps, VOLdown is 129 81 Keyboard Volume Down,0x81 as you can see
page 57 in https://hotfile.com/dl/166210456/a15ed4 ... e.pdf.html file.

fourth: it says I can use internal or no table (IR_Configuration) whitch internal tables do you mean? and witch keys codes these tables uses?
Internal tables?? all the key code is in hid_usage.pdf file.

Kind Regards

steven
steven
 
Posts: 2239
Joined: Fri Aug 06, 2010 3:23 pm

Re: Editing Commands

Postby cia » Mon Jan 28, 2013 3:43 pm

Hello Steven,

first of all: thanks for your Reply!

the first and the second thing is ok for me, but I think it should be explained in the inf-file or a readme or something...

the third and fourth thing: please take a look on the attached jpg, this is the vhid.inf section - there are notices aboute keyboard and system (HID-Table) so I think it means HID-Table 02 (system) and HID-Table 07 (keyboard)... and a few lines above ther is a notice about use of internal table (1:cyberlink 2:Sinovideo)....
Attachments
tbs6981vhid.JPG
cia
 
Posts: 4
Joined: Thu Jan 24, 2013 3:35 am

Re: Editing Commands

Postby cia » Fri Feb 01, 2013 6:20 pm

Hi there,

as it seems to be difficult to get an answer to question three and four, I have played around with some things and get a (for me) acceptable solution:

I have remapped the remote-buttons to the keyboard as I think it is senseful, including Win-Application-Key (Rightclick) and hibernate from within MCE.
I use a Logitech Harmony which have a Macro solution to switch all devices on and off as they are needed - ofcourse, I cannot switch on the HTPC with the remote, but I can hibernate it with the PowerOff button on the Harmony - I think this is really a good solution instead of going through some menues especially in Windows 8...

okay, if anybody need this, below is the download of the archive you need, readme included....

greets, CIA
Attachments
TBS_vhid_MCE.zip
(414.26 KiB) Downloaded 305 times
Last edited by cia on Thu Jan 23, 2014 5:59 pm, edited 1 time in total.
cia
 
Posts: 4
Joined: Thu Jan 24, 2013 3:35 am

Re: Editing Commands

Postby cia » Mon Feb 11, 2013 4:31 pm

Hello @all,

for the above ZIP-file there is a "bug" (its not really a bug but a issue if you do use a german keyboard lauout QWERTZ):
for the correct function of the ZOOM function you have to edit the tbs6981vhid.inf line

"IR_Virtualcode_29", 0x00010001, 0x0011011d, 0x00
into
"IR_Virtualcode_29", 0x00010001, 0x0011011c, 0x00

else you get a CTRL+Shift+Y (which does nothing in MediaCenter)

sorry for this issue, but I only have the USB-HID-table provided from steven which seems to be in QWERTY-Layout...

btw. steven, are you able to initiate some changes in programming the tbs6981vhid.sys? (and maybe all other Cx238x-TBScard-sys-files)

1. the delay between two commands is too long, if you go through lists, the *vhid.sys sends keypresses with a delay of about 500msec, so it will execute keypresses even if you already release the remotebutton for "long" time ago - it would be good if you can set the delay at about 100msec or at least 200msec for better use (hid-keyboard is set to 25msec, so it should work)
2. there no possibility to set (or even use) a long remotebutton-press to repeat this button (i.e. volume or channel or cursor-keys for use as a keyboard-mouse) - can you implement this (maybe with a setable flag in the *vhid.inf) so that apps like KYLO-Browser can use the MOUSE-function?
3. as I posted before it would be fine if we can use different HID-pages in *vhid.inf (page 07 for keyboard commands odr page 02 for system commands....)

thats all for now, awaiting your answer,
Greets, CIA
cia
 
Posts: 4
Joined: Thu Jan 24, 2013 3:35 am


Return to Windows

Who is online

Users browsing this forum: No registered users and 8 guests