Please help with my script work for only second keyboard

Get help with using AutoHotkey and its commands and hotkeys
shyam
Posts: 1
Joined: 08 Dec 2016, 07:43

Please help with my script work for only second keyboard

26 Dec 2016, 02:30

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.




NumpadSub::Alt
return
NumpadAdd::Ctrl
return
Enter::space
return
ScrollLock::NumLock
return
Pause::Escape
return
Break::Delete
return
Numlock::F2
return
NumpadDiv::F3
return
NumpadMult::F4
return
Numpad7::F5
return
Numpad8::F6
return
Numpad9::F7
return
Numpad4::F8
return
Numpad5::F9
return
Numpad6::F10
return
Numpad1::F11
return
Numpad2::F12
return
Numpad3::!^+F4
return
Numpad0::Shift
return
NumpadDot::!^+F5
return
NumpadIns::Shift
return
Home::m
return
End::^d
return
Insert::l
return
PgUp::c
return
Delete::!+^F2
return
PgDn::r
return
Up::v
return
Left::b
return
Down::Enter
return
Right::e
return
Backspace::i
return
F9::k
return
F10::o
return
F11::x
return
F12::g
return
RControl::^h
return
Space::q
return
RWin::p
return
RShift::Shift
return
RAlt::Alt
return
o::^F13
return
p::^F14
return

;Please help my script only work for second keyboard. and please dont send links which are already in the forum because i didnt understand that well due to my no background in coding before. i have my code working but it triggers my both primary and secondary key. i tried hard to understand luamarcos, hidmacros and intercept... i didnt find any proper tutorial on internet.. intercept was understandable but my keystrokes on my second keyboard are not identified correctly... so please somebody help me. i want this script to work for my second keyboard..... systemid seen from hidmacros is snipped in my post if it helps in any way..Image
User avatar
Nextron
Posts: 1364
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win7 x64 AHK: Unicode x32

Re: Please help with my script work for only second keyboard

26 Dec 2016, 17:21

shyam wrote:Please help my script only work for second keyboard.
That's not going to happen. The low level keyboard hook used in AHK's remappings allows detection of keys and dropping/dismissing them for further detection by other processes but cannot discern between input devices. Raw input does allow differentiation between input from different keyboards but cannot prevent the input from passing on to other processes. Importantly, the hook is processed before the raw input, so you cannot make them work in tandem.

Intercept is a driver, which does allow both input device identification and dropping of input long before input reaches any of the above.
Luamacros uses a different hook not available in AHK and raw input to achieve the same result.
ToonyTom
Posts: 9
Joined: 04 Mar 2015, 04:41

Re: Please help with my script work for only second keyboard

26 Dec 2016, 18:04

Nextron is right. Interception.dll is probably your best bet. Over on Orbiter Forum someone coded a small simple command line program that uses interception.dll. You have to register to download the zip of it, but it works for what you need :thumbup:

Return to “Ask For Help”

Who is online

Users browsing this forum: ankitkraken, Bing [Bot], Google [Bot], hamidi, StefanD and 177 guests