Bind keyboard and mouse to specific window

How can be this controlled in that simulator? Can HIDmacros be used with this application?
Post Reply
awmn34
Posts: 1
Joined: 25 Aug 2012, 20:01

Bind keyboard and mouse to specific window

Post by awmn34 » 25 Aug 2012, 20:08

Hello, newbie here, with my first question:

Is it possible to use HIDmacros and its keyboard detection feature to use a 2nd keyboard exclusively with a specific window?
To give you an idea, I' thinking of running XBMC on my 2nd monitor (TV, actually) and allow the rest of the family control it, while I am using the pc

Thank you,
Manolis

admin
Site Admin
Posts: 699
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Bind keyboard and mouse to specific window

Post by admin » 27 Aug 2012, 07:42

No, currently it's not possible.
Petr Medek
LUAmacros author

andersbrontosaurus
Posts: 1
Joined: 10 Feb 2016, 01:36

Re: Bind keyboard and mouse to specific window

Post by andersbrontosaurus » 10 Feb 2016, 01:47

Bumping this question.

I have a similar question.
I want to send keystrokes from one keyboard to a specific window and keystrokes from another keyboard to another specific window.
Can this be done with HIDMacros or does someone have another brilliant suggestion?

The reason for my question is that I want to control different machines in Jeskola Buzz.

Thanks in advance
:-)


Image

admin
Site Admin
Posts: 699
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Bind keyboard and mouse to specific window

Post by admin » 11 Feb 2016, 09:10

This is not currently possible. Long time ago I was trying to send keys directly to application window (even inactive) but never worked.
Maybe you could activate the window first and then send keystrokes via some script... never tried.
Also in Hidmacros you can not define macro for whole keyboard, you would have to set macro for each key. Global macro can be defined in LuaMacros
Petr Medek
LUAmacros author

ReallyBigTeeth
Posts: 1
Joined: 15 Feb 2016, 22:00

Re: Bind keyboard and mouse to specific window

Post by ReallyBigTeeth » 15 Feb 2016, 22:16

I have done something like what you are asking for. I wrote vbscripts for each key of a cheap number pad keyboard. The scripts do an "appactivate" for a specific window/program, then send the keystroke or key combination that I want sent to that specific open window.

Here is an example of a script that sets windows focus on an open pdf document, sends a down arrow keystroke (this switches to the next page in the pdf while it's full screen mode), then switches focus back to the window I was previously in using the ALT+TAB combination:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.AppActivate " - Adobe Acrobat Reader DC"
WshShell.SendKeys "{DOWN}"
WshShell.SendKeys "%{TAB}"

Create 104 scripts per keyboard then map them to your keyboard keys using HIDMacros. It's a bit of work, but it would do what you want.

allan
Posts: 3
Joined: 24 Jun 2020, 21:12

Re: Bind keyboard and mouse to specific window

Post by allan » 24 Jun 2020, 21:17

admin wrote:
11 Feb 2016, 09:10
This is not currently possible. Long time ago I was trying to send keys directly to application window (even inactive) but never worked.
Maybe you could activate the window first and then send keystrokes via some script... never tried.
Also in Hidmacros you can not define macro for whole keyboard, you would have to set macro for each key. Global macro can be defined in LuaMacros
Is there a way to do this with LuaMacros by now - without activating the window first? It looks like it's possible (to send command to another window) with AutoHotKey: https://www.reddit.com/r/AutoHotkey/com ... ve_window/

admin
Site Admin
Posts: 699
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Bind keyboard and mouse to specific window

Post by admin » 25 Jun 2020, 07:57

Technically there's probably some way how to do it but no, not currently implemented in luamacros.
Petr Medek
LUAmacros author

Markstern
Posts: 1
Joined: 06 Apr 2021, 07:32

Re: Bind keyboard and mouse to specific window

Post by Markstern » 06 Apr 2021, 07:42

Hey guys, I realise this thread is almost a teenager by now but to answer the questions (and perhaps someone else browsing it in the future to find an answer to this) as to whether its possible:

It IS possible to do what several of you want (to control 2 different applications using 2 different HIDs simultaneously) without any custom scripting or the like; The answer is to put one of the applications in a virtual machine environment. I use VMware Workstation for running these myself, and it supports permanently binding devices to VMs. Thus if you bind say a monitor and a keyboard to a VM running (likely an OS supported by the application in question) it will mount said devices in the VM making them exclusively control it.

Hope that helps someone. Best regards // Marc

Post Reply