IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Keyboard Redirector, Remap keys on your "HID keyboard device" remotes
nate
post Dec 2 2009, 12:23 PM
Post #1


DigitalWatch Developer
Group Icon

Group: Admin
Posts: 2,267
Joined: 30-September 03
From: Melbourne
Member No.: 169
Card: DNTV Quad


I know, I know, I should be working more on DW3, but I've been setting up my new HTPC lately and came across the need to remap the keys on my remote controls (TinyTwin remote, VisionPlus remote, and SunWave SMR-140). Problem was, the remote recievers for these remotes are HID keyboard devices, so pressing keys on the remote is just like pressing keys on the keyboard.
All the key handling applications I tried (EventGhost, Girder, and HIP) were unable to tell the difference between the remote controls and the main keyboard (which I still wanted to be able to use).

So what do you do when you can't find an an application to do what you need? You write your own of course. It's taken me about a month to get to the point where I'm happy enough with the code to share it, but I'm finally there. I wrote more about the development process and how it works on the website.

Keyboard Redirector
Source code (Subversion repository)

Keen to hear any feedback, bug, feature requests.


--------------------
Go to the top of the page
 
+Quote Post
wirrunna
post Dec 3 2009, 07:56 AM
Post #2


Participant


Group: Members
Posts: 98
Joined: 31-December 05
From: Broulee, NSW, Australia
Member No.: 4,069
Card: DNTV Live Dual Hybrid PCIe S2


nate, this looks like a great development. I will try it over the weekend when I get home and report back.
I have always felt that the remote supplied with DNTV Live tuners were the weak link, now it appears that your application has plugged the gap. Like you, I had tried EventGhost and HIP to no avail.
Go to the top of the page
 
+Quote Post
nate
post Dec 23 2009, 12:49 PM
Post #3


DigitalWatch Developer
Group Icon

Group: Admin
Posts: 2,267
Joined: 30-September 03
From: Melbourne
Member No.: 169
Card: DNTV Quad


New Version: 1.1.0.42
Download

Changes:
If it's already working for you then these changes won't affect you much. They're mostly to get it working on various machines and in different conditions.

  • Fixed up unhandled exception handling. The log files should contain the exception information now.
  • Added retry of reading registry information when a device is plugged in. It was throwing an exception that the registry key couldn't be found.
  • Removed DispatchMessage call that was causing a crash in XP 32bit (previously all my testing had been on Vista x64).


--------------------
Go to the top of the page
 
+Quote Post
drdos7
post Dec 30 2009, 04:58 PM
Post #4


Forum Regular


Group: Members
Posts: 188
Joined: 18-March 04
From: Victoria, Australia
Member No.: 642
Card: Compro VideoMate DVB-T300


Hi,

I've tried using KBR and this is how it looks on my screen:

Attached File  KBR.jpg ( 163.13K ) Number of downloads: 11


Also I'm finding the proggie locks up. It took input OK first time I used it, but as you can see, doesn't look like your screen shots.

I'm using W7 Ultimate 32b, at 1360*768 res.

Thanks,

dRdoS7
Go to the top of the page
 
+Quote Post
nate
post Jan 3 2010, 09:48 PM
Post #5


DigitalWatch Developer
Group Icon

Group: Admin
Posts: 2,267
Joined: 30-September 03
From: Melbourne
Member No.: 169
Card: DNTV Quad


Hi dRdoS7.

That's one weird screenshot. I've no idea why it looks like that. The only thing i can think that might make the gui look odd is using a font DPI other than 96, but I haven't tested this to know for sure. That shouldn't stop the tree view on the left showing up though.

Can you check if there's an exception.log file for me? If it exists it'll be in your %allusersprofile%\KeyboardRedirector\ folder.
It's possible W7 has new restrictions on windows hooks that XP and Vista don't.

I run the same resolution as you on my htpc so that's not a problem. I don't have a W7 system at the moment so i can't test that out, but I should have one in a few weeks.

In the meantime I wonder if it's worth trying some of the compatability options (in the property pages of the KeyboardRedirector.exe)


As an aside, I've been crook today so I spent most of the day on the couch using the remote. I only had to restart KBR once after one of the remote keys got stuck down and the Raw Input messages stopped being recieved. So, still a few problems to work out but it's been fairly reliable for me today at least.

nate


--------------------
Go to the top of the page
 
+Quote Post
drdos7
post Jan 4 2010, 10:43 PM
Post #6


Forum Regular


Group: Members
Posts: 188
Joined: 18-March 04
From: Victoria, Australia
Member No.: 642
Card: Compro VideoMate DVB-T300


Hi,

No exceptions.log file, and I checked my font is 120dpi.

Nasty being crook on a weekend!! Self infilicted?

Thanks,

dRdoS7
Go to the top of the page
 
+Quote Post
nate
post Jan 5 2010, 08:14 AM
Post #7


DigitalWatch Developer
Group Icon

Group: Admin
Posts: 2,267
Joined: 30-September 03
From: Melbourne
Member No.: 169
Card: DNTV Quad


QUOTE (drdos7 @ Jan 4 2010, 11:43 PM) *
No exceptions.log file, and I checked my font is 120dpi.
Okay. I'll try it out at 120.

QUOTE (drdos7 @ Jan 4 2010, 11:43 PM) *
Nasty being crook on a weekend!! Self infilicted?
No, not self inflicted, and still hanging around so it's not just the weekend. I think I must have caught something on the bus ride I took from Albury to Melbourne on Saturday. The bus was packed with tourists heading from Sydney to Melbourne.


--------------------
Go to the top of the page
 
+Quote Post
GoLL@B
post Feb 1 2010, 08:45 PM
Post #8


Be nice to me, I am new.


Group: New Members
Posts: 5
Joined: 1-February 10
Member No.: 13,128
Card: None


Wow, it`s what I need. Finally!

Congratulations, perfect work.

I have one more idea, can you add an option with long press of button? I think about remote. When I press short everything works fine, but if I press long it`s still working with original function.
Go to the top of the page
 
+Quote Post
drdos7
post Feb 6 2010, 10:15 PM
Post #9


Forum Regular


Group: Members
Posts: 188
Joined: 18-March 04
From: Victoria, Australia
Member No.: 642
Card: Compro VideoMate DVB-T300


Hi,

QUOTE (nate @ Jan 3 2010, 10:48 PM) *
In the meantime I wonder if it's worth trying some of the compatability options (in the property pages of the KeyboardRedirector.exe)


I've tried "Compatability" (as Vista), no different.

I did discover the "tree view" by resizing to the right with the center bar.

Attached File  KBR2.jpg ( 153.22K ) Number of downloads: 7



Have you tried KBR with W7 yet?

Thanks,

dRdoS7.
Go to the top of the page
 
+Quote Post
GoLL@B
post Feb 14 2010, 02:40 AM
Post #10


Be nice to me, I am new.


Group: New Members
Posts: 5
Joined: 1-February 10
Member No.: 13,128
Card: None


QUOTE (drdos7 @ Feb 6 2010, 10:15 PM) *
Have you tried KBR with W7 yet?


I am using windows 7 and I have not problem like you. I have been using RC-201 so far.
Go to the top of the page
 
+Quote Post
GoLL@B
post Apr 16 2010, 04:29 PM
Post #11


Be nice to me, I am new.


Group: New Members
Posts: 5
Joined: 1-February 10
Member No.: 13,128
Card: None


Hello again,

Lately, I installed Windows Xp and the program freezes. When I set any option in KR and I press key in functional program, function won`t work and KR freezes.

I suppose I haven`t got something, but what? In Windows7 I haven`t got this problem.

Regards,
GoLL@B.
Go to the top of the page
 
+Quote Post
drdos7
post Apr 26 2010, 11:12 AM
Post #12


Forum Regular


Group: Members
Posts: 188
Joined: 18-March 04
From: Victoria, Australia
Member No.: 642
Card: Compro VideoMate DVB-T300


Hi,

I changed my font size from 125% to 100% and can see KeyboardRedirector fully.

While mapping and changing buttons on my HP remote (non-RC6 sadly) the program occaisionally locked-up. Killed it and restarted OK, and I continued. I've used it in 7MC, but it causes a lock-up there too. If I kill KR, 7MC works straight away.

Any ideas? Is there possibly a text box or something opening under the main window?

There's no error log in KR user directory.

I was hoping to use KR as a "HIP replacement". If I start MC via HIP it doesn't always have focus, which it does when I use KR, even though I start it with the executable not key stroke in both.

When testing, I turn off HIP when using KR and vice versa.

Thanks,

dRdoS7.
Go to the top of the page
 
+Quote Post
drdos7
post Jul 13 2010, 02:51 PM
Post #13


Forum Regular


Group: Members
Posts: 188
Joined: 18-March 04
From: Victoria, Australia
Member No.: 642
Card: Compro VideoMate DVB-T300


Hi,

I'm trying KBR again. Hasn't locked up this time (so far).

How would I do "LWin+Alt+Enter" as a keyboard action? I can get any 2 but not all 3 at the same time.

Thanks,

dRdoS7.
Go to the top of the page
 
+Quote Post
nate
post Jul 14 2010, 04:30 PM
Post #14


DigitalWatch Developer
Group Icon

Group: Admin
Posts: 2,267
Joined: 30-September 03
From: Melbourne
Member No.: 169
Card: DNTV Quad


I'll need to add a modifier option for LWin (and i guess RWin while I'm at it) to let you do that.


--------------------
Go to the top of the page
 
+Quote Post
drdos7
post Jul 15 2010, 04:45 PM
Post #15


Forum Regular


Group: Members
Posts: 188
Joined: 18-March 04
From: Victoria, Australia
Member No.: 642
Card: Compro VideoMate DVB-T300


Hi,

OK, can't wait.

dRdoS7.

This post has been edited by drdos7: Jul 15 2010, 04:52 PM
Go to the top of the page
 
+Quote Post
nate
post Jul 16 2010, 12:30 AM
Post #16


DigitalWatch Developer
Group Icon

Group: Admin
Posts: 2,267
Joined: 30-September 03
From: Melbourne
Member No.: 169
Card: DNTV Quad


Here you go. Try this out.

New Version: 1.1.0.46
Download

Changes:
  • A few updates for compatibility on different computers.
  • Added LWin and RWin to the modifiers list for Keyboard Actions.

I started working on fixing the problems on screens set to DPI's other than 96, but it's a nightmare, so unless i get inspiration I probably won't be finishing it.


--------------------
Go to the top of the page
 
+Quote Post
drdos7
post Jul 16 2010, 07:28 PM
Post #17


Forum Regular


Group: Members
Posts: 188
Joined: 18-March 04
From: Victoria, Australia
Member No.: 642
Card: Compro VideoMate DVB-T300


Hi,

LWin key works a treat.

I am still having problems with KBR locking up

I know how to cause it, I don't know if you can (or even want to) fix it. I'm guessing it's not been a problem for you.

As an example, my HP remote has a button, which is the TAB key, according to KBR. When I remap it as Ctrl+D in ehshell, it causes a lock-up of MC until I kill KBR. I tried it with TAB on the keyboard, and it does the same. I also tried it for notepad, same result.

As test, I remapped them as TAB, it didn't lock-up. But it did do TAB twice in MC, but not notepad. I noticed a couple of times when it was remapped as Ctrl+D, it did TAB, then Ctrl+D in MC (on the occasions it didn't lock).

A couple of other remote buttons I've tried do the same. Strangely the button I've remapped to "LWin+Alt+Enter" hasn't caused a lock-up.

Thanks,

dRdoS7
Go to the top of the page
 
+Quote Post
nate
post Jul 16 2010, 10:02 PM
Post #18


DigitalWatch Developer
Group Icon

Group: Admin
Posts: 2,267
Joined: 30-September 03
From: Melbourne
Member No.: 169
Card: DNTV Quad


Does this only happen with ehshell? I don't have WMC installed at the moment so can't test that, but I've tried out your scenario with a few others apps and haven't had any problems.

I do very occasionally have a lockup on my htpc, but no really repeatable. I did notice one time a problem occured due to an application having it's cpu priority set to high and taking up 100% of the cpu. KBR, having a lower cpu priority, couldn't process the key presses, so input to the application appeared to hang. You could try using task manager to increase the priority of KBR. If this works I could add an option to increase it by default when it starts.

If that doesn't work, it might help if I can get logs of what's happening when the hang occurs.
Can you please
  • Go to this folder. %allusersprofile%\KeyboardRedirector\
  • Close KBR
  • Delete the log files (main.log, and exception.log if it exists)
  • Start KBR.
  • Swtich to ehshell, press tab to cause the hang.
  • Kill KBR
  • Post the contents of main.log, and exception.log if it exists.


--------------------
Go to the top of the page
 
+Quote Post
drdos7
post Jul 17 2010, 09:28 PM
Post #19


Forum Regular


Group: Members
Posts: 188
Joined: 18-March 04
From: Victoria, Australia
Member No.: 642
Card: Compro VideoMate DVB-T300


Hi,

QUOTE (nate @ Jul 16 2010, 10:02 PM) *
Does this only happen with ehshell? I don't have WMC installed at the moment so can't test that, but I've tried out your scenario with a few others apps and haven't had any problems.

I do very occasionally have a lockup on my htpc, but no really repeatable. I did notice one time a problem occured due to an application having it's cpu priority set to high and taking up 100% of the cpu. KBR, having a lower cpu priority, couldn't process the key presses, so input to the application appeared to hang. You could try using task manager to increase the priority of KBR. If this works I could add an option to increase it by default when it starts.

If that doesn't work, it might help if I can get logs of what's happening when the hang occurs.
Can you please
  • Go to this folder. %allusersprofile%\KeyboardRedirector\
  • Close KBR
  • Delete the log files (main.log, and exception.log if it exists)
  • Start KBR.
  • Swtich to ehshell, press tab to cause the hang.
  • Kill KBR
  • Post the contents of main.log, and exception.log if it exists.


No, the lockups also occur in notepad, which I used to test if it was only ehshell or not.

Increasing priority to high didn't help.

I've done as you asked, but after restarting I set TAB as Ctrl-d (HP remote), so maybe you can see it in the log.

I've attached the new main.log, a new execption.log file wasn't created, I've attached the one that was already there. I had to rename them as ".txt" before it woud allow me to upload them.

Thanks,

dRdoS7.

Attached File  main.log.txt ( 623.42K ) Number of downloads: 1

Attached File  exception.log.txt ( 2.19K ) Number of downloads: 1
Go to the top of the page
 
+Quote Post
nate
post Jul 18 2010, 12:15 AM
Post #20


DigitalWatch Developer
Group Icon

Group: Admin
Posts: 2,267
Joined: 30-September 03
From: Melbourne
Member No.: 169
Card: DNTV Quad


The first thing that strikes me is that before the crash KBR wasn't working correctly. You can see in the log consecutive lines like
CODE
info :2010/07/17 21:03:42:     : 221.983:  0x0001008d KEYDOWN    : 0x27(Right) makecode:0x4d flags:0x0002 extraInfo:0 ext:True
info :2010/07/17 21:03:42:     : 221.991:  0x0001008d KEYUP      : 0x27(Right) makecode:0x4d flags:0x0003 extraInfo:0 ext:True


when it should be extra lines starting with LLUp LLDown, Up, and Down, like further down in the log.
CODE
info :2010/07/17 21:11:21:     : 246.162: LLDown :       ^Right
info :2010/07/17 21:11:21:     : 246.162:  0x0001008b KEYDOWN    : 0x27(Right) makecode:0x4d flags:0x0002 extraInfo:0 ext:True
info :2010/07/17 21:11:21:     : 246.162:   Down :       ^Right
info :2010/07/17 21:11:21:     : 246.314: LLUp   :       ^Right
info :2010/07/17 21:11:21:     : 246.314:  0x0001008b KEYUP      : 0x27(Right) makecode:0x4d flags:0x0003 extraInfo:0 ext:True
info :2010/07/17 21:11:21:     : 246.314:   Up   :       ^Right


This means before the crash KBR was getting messages from the raw input API, but wasn't getting any messages from the keyboard hooks. I suppose this could happen if the application in focus was intercepting the hook events before KBR could see them. Which application were you using at the time? Maybe you could see if that's a one off occurance or if you can get a repeatable scenario where the hook messages are missing.

As to the crash, I don't see anything obvious, but then we need to work out the above issue before I can really get useful information from the logs.

It might also help me if you could send me your settings.xml file.

Nate


--------------------
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th December 2017 - 03:58 PM