assembly - Emulate keyboard click on Windows using Asembler Nasm - Stack Overflow

I am not an experienced developer, do not judge strictlyI am writing a short application in the Assemb

I am not an experienced developer, do not judge strictly

I am writing a short application in the Assembler Nasm language, I managed to make the click click of the CapsLock keyboard, but the problem is that after emulating pressing CapsLock, it holds it and does not release,

I need to add a command so that after pressing the CapsLock key, it releases it after that

section .text
global _start
extern ExitProcess
extern keybd_event

_start:

    push 0   
    push 0x14 
    call keybd_event 

    push 1      
    push 0x14     
    call keybd_event 
      
    call ExitProcess 

I compile this code in CMD with these commands

nasm -f win32 mouse.asm -o mouse.obj

golink /entry:_start /console kernel32.dll user32.dll mouse.obj

I still couldn't fix this error of releasing the CapsLock key, so after launching this exe (mouse.exe) I need to press CapsLock so that it releases this key

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744283867a4566704.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信