Raik Posted February 3, 2010 Posted February 3, 2010 workaround for a defect "fujitsu-siemens amilo pi2550"-keyboard, backspace-key does send additional numlock-code my solution until now: expandcollapse popupHotKeySet("{BACKSPACE}", "BSP") HotKeySet("{NUMLOCK}", "NUM") dim $bs_t, $nm_t, $key="NN" Func BSP() $bs_t = TimerInit() $key=StringRight($key,1)&"B" fn() EndFunc Func NUM() $nm_t = TimerInit() $key=StringRight($key,1)&"N" fn() EndFunc Func fn() $delay=Abs($nm_t - $bs_t) TrayTip($delay,$key,200) If $key = "NB" OR $key = "BN" AND $delay < 20000 THEN ;HotKeySet("{NUMLOCK}") Sleep(150) Send("{NUMLOCK}") ;HotKeySet("{NUMLOCK}", "NUM") HotKeySet("{BACKSPACE}") Send("{BACKSPACE}") HotKeySet("{BACKSPACE}", "BSP") EndIf If $key = "BB" THEN HotKeySet("{BACKSPACE}") Send("{BACKSPACE}") HotKeySet("{BACKSPACE}", "BSP") EndIf EndFunc While 1 Sleep(1000) WEnd if the "sleep" is to short, numlock will not be send. if to long, typing (pressing backspace) has to be slower. is it possible, to supress the numlock-code, or to send it with shorter delay by direct use of dllcall ? AutoIt-Syntaxsheme for Proton & Phase5 * Firefox Addons by me (resizable Textarea 0.1d) (docked JS-Console 0.1.1)
Raik Posted February 3, 2010 Author Posted February 3, 2010 backspace is a wide key and numlock is on the upper right to it. if i just tip, not press numlock, it sends its keycode repeadly. if i press backspace on the lower left, i get "backspace", on the middle or left i get backspace + numlock or numlock + backspace, and if i hold down the key, it sends numlock instead of backspace repeadly. AutoIt-Syntaxsheme for Proton & Phase5 * Firefox Addons by me (resizable Textarea 0.1d) (docked JS-Console 0.1.1)
Raik Posted February 3, 2010 Author Posted February 3, 2010 (edited) runs faster then my script, but if i press backspace realy fast repeatly, it toggles numlock in the wrong state. better, but not perfect.. i will have a look at the bios, if it is possible, to disable the numpad-funktion. EDIT: not perfect, but much better then my script. my Solution: i have disabled the numlock-key via scancodemap entry in the registry. Edited February 3, 2010 by Raik AutoIt-Syntaxsheme for Proton & Phase5 * Firefox Addons by me (resizable Textarea 0.1d) (docked JS-Console 0.1.1)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now