i wanna something like this
Code: Select all
if usb_keyboard()==true
Blockinput, LaptopKeyBoardSend ; any like this?
Code: Select all
if usb_keyboard()==true
Blockinput, LaptopKeyBoardSend ; any like this?
Thanks, reading and trying.
Code: Select all
#SingleInstance force
#Persistent
#include Lib\AutoHotInterception.ahk
#NoTrayIcon
global AHI := new AutoHotInterception()
SetTimer, loopfunc, 500 ;i will use all the time from the windows start
Return
KeyEvent(code, state){
}
loopfunc(){
keyid:=""
keyid:= AHI.GetKeyboardId(0x258A, 0x0049) ;usb keyboard's id, i get it with Monitor.ahk
if (keyid!=""){
keyboardId := AHI.GetKeyboardId(0x0000, 0x0000,2) ;laptop keyboard's id, 3rd parameter is 1 by default, i make it work putting 2 as instance
AHI.SubscribeKeyboard(keyboardId, true, Func("KeyEvent")) ;assign all keys to do nothing (Y) so now can i put my usb keyboard over laptop keyboard
}
}
^esc::
ExitApp ;if i need something from laptop keyboard :v
I did this and i bug all usb devices.... only touchpad works, to fix it i did next:ositoMalvado wrote: ↑27 Nov 2022, 09:02Thanks, reading and trying.
Code: Select all
#SingleInstance force #Persistent #include Lib\AutoHotInterception.ahk #NoTrayIcon global AHI := new AutoHotInterception() SetTimer, loopfunc, 500 ;i will use all the time from the windows start Return KeyEvent(code, state){ } loopfunc(){ keyid:="" keyid:= AHI.GetKeyboardId(0x258A, 0x0049) ;usb keyboard's id, i get it with Monitor.ahk if (keyid!=""){ keyboardId := AHI.GetKeyboardId(0x0000, 0x0000,2) ;laptop keyboard's id, 3rd parameter is 1 by default, i make it work putting 2 as instance AHI.SubscribeKeyboard(keyboardId, true, Func("KeyEvent")) ;assign all keys to do nothing (Y) so now can i put my usb keyboard over laptop keyboard } } ^esc:: ExitApp ;if i need something from laptop keyboard :v
Code: Select all
#NoTrayIcon
#SingleInstance force
#Persistent
#include Lib\AutoHotInterception.ahk
;#NoTrayIcon
global AHI := new AutoHotInterception()
global LAPTOP_KEY_ID:=AHI.GetKeyboardId(0x0000, 0x0000,2)
Return
KeyEvent(code, state){
}
^#esc::
escto:=!escto
if escto
AHI.SubscribeKeyboard(LAPTOP_KEY_ID, true, Func("KeyEvent"))
else
AHI.UnsubscribeKeyboard(LAPTOP_KEY_ID, true, Func("KeyEvent"))