最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin5浏览0评论

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

发布评论

评论列表(0)

  1. 暂无评论