Computer Hope

Software => Computer software => Topic started by: Bret72 on August 14, 2017, 06:56:10 AM

Title: toggle keyboard key on software level
Post by: Bret72 on August 14, 2017, 06:56:10 AM
hello
how do I keep a keyboard key pressed on a software level so that key that I chose is pressed nonstop?
for example i want to spam "m" nonstop on a software level
so in notepad its mmmmmmmmmmmmmmmmmmmmmm.... in infinity, without me pressing the "m" button on the keyboard physically
Title: Re: toggle keyboard key on software level
Post by: Geek-9pm on August 14, 2017, 10:48:07 AM
This has been covered before on this forum.
Your description does not say how you would stop it.
Why do you need it? Is it an attempt to reform some kind of test?
This can be done in Vb-script. But more detail is needed about what you want to do.
Title: Re: toggle keyboard key on software level
Post by: Allan on August 14, 2017, 11:33:02 AM
Please stop telling people questions have been covered before on the forum. Answer the question or don't, but let's be more welcoming to new members.
Title: Re: toggle keyboard key on software level
Post by: Geek-9pm on August 14, 2017, 11:45:50 AM
Here is the answer:
Auto Hot Key
https://www.computerhope.com/jargon/a/autohotkey.htm
Quote
AutoHotkey is a fantastic free and open source Microsoft Windows tool that allows you to create macros, scripts, and automate frequently performed tasks on your computer
Which will lead to:
https://www.computerhope.com/tips/tip209.htm
You will have to write a script that sends a text to the keyboard input as if it had been typed by a human. It is very fast.

This might be what you need. It may look like overkill, but it is easier that trying to write a program from scratch. The use of Auto Hot Key has been mentioned many times on this forum. It still is the best way to get automated input from the keyboard.