Click here to Skip to main content
15,922,315 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Simulate a key behind held down Pin
musefan28-Feb-20 3:59
musefan28-Feb-20 3:59 
GeneralRe: Simulate a key behind held down Pin
dandy7228-Feb-20 4:32
dandy7228-Feb-20 4:32 
GeneralRe: Simulate a key behind held down Pin
Mycroft Holmes28-Feb-20 11:37
professionalMycroft Holmes28-Feb-20 11:37 
GeneralRe: Simulate a key behind held down Pin
OriginalGriff28-Feb-20 11:43
mveOriginalGriff28-Feb-20 11:43 
GeneralRe: Simulate a key behind held down Pin
Mycroft Holmes28-Feb-20 11:48
professionalMycroft Holmes28-Feb-20 11:48 
GeneralRe: Simulate a key behind held down Pin
Maximilien28-Feb-20 4:04
Maximilien28-Feb-20 4:04 
GeneralRe: Simulate a key behind held down Pin
F-ES Sitecore28-Feb-20 4:10
professionalF-ES Sitecore28-Feb-20 4:10 
GeneralRe: Simulate a key behind held down Pin
raddevus28-Feb-20 4:20
mvaraddevus28-Feb-20 4:20 
I was thinking you could maybe run a program that registers a system-wide hotkey (assuming Windows here, since you didn't mention).
Then, when you hit the Ctrl-Alt-Shift-W or whatever the program would do keypresses (SendKey Windows KeyPress for 'w') foryou.

#################
Begin EDIT
Just found this...C# Global Keyboard Hotkeys not working in game fullscreen[^]

End EDIT
#################

However, if the game is full-screen I don't think it'll respect the system-wide hotkey. I'm not sure.
If it doesn't then you would have to do this with hardware.
Hardware Solution
This can be done very easily with a Arduino Leonardo (aka Pro Micro) because you plug one of those into a system running any OS (Linux, Win, Mac) and it will be recognized as a keyboard (it has built-in USB HID and is recognized as a keyboard.
You can get one for $7 USD (Amazon.com: FTCBlock Pro Micro ATmega32U4 5V/16MHz Module Boardc[^])
Then, it is a very simple matter of wiring up two buttons and a little code on the Arduino so when you hit one button, it continually types 'w' and then when you hit the other it stops.
If you have to go the hardware route, and you really want to try it I am happy to give a lending hand.
However, I understand that this is more extensive.
Good luck.

modified 28-Feb-20 10:32am.

GeneralRe: Simulate a key behind held down Pin
DerekT-P28-Feb-20 4:20
professionalDerekT-P28-Feb-20 4:20 
GeneralRe: Simulate a key behind held down Pin
dandy7228-Feb-20 4:34
dandy7228-Feb-20 4:34 
GeneralRe: Simulate a key behind held down Pin
W Balboos, GHB28-Feb-20 4:24
W Balboos, GHB28-Feb-20 4:24 
GeneralRe: Simulate a key behind held down Pin
David O'Neil28-Feb-20 4:58
professionalDavid O'Neil28-Feb-20 4:58 
GeneralRe: Simulate a key behind held down Pin
dandy7228-Feb-20 9:59
dandy7228-Feb-20 9:59 
GeneralRe: Simulate a key behind held down Pin
Eddy Vluggen28-Feb-20 5:58
professionalEddy Vluggen28-Feb-20 5:58 
GeneralRe: Simulate a key behind held down Pin
dandy7228-Feb-20 10:01
dandy7228-Feb-20 10:01 
GeneralRe: Simulate a key behind held down Pin
Eddy Vluggen28-Feb-20 10:32
professionalEddy Vluggen28-Feb-20 10:32 
GeneralRe: Simulate a key behind held down Pin
Nelek28-Feb-20 8:53
protectorNelek28-Feb-20 8:53 
GeneralRe: Simulate a key behind held down Pin
dandy7228-Feb-20 9:57
dandy7228-Feb-20 9:57 
GeneralRe: Simulate a key behind held down Pin
Nelek29-Feb-20 6:58
protectorNelek29-Feb-20 6:58 
GeneralCCC - 2020-02-28 - SOLVED! Pin
musefan27-Feb-20 22:01
musefan27-Feb-20 22:01 
GeneralRe: CCC - 2020-02-28 Pin
Paddington Bear27-Feb-20 22:04
Paddington Bear27-Feb-20 22:04 
GeneralRe: CCC - 2020-02-28 - WINNER! Pin
musefan27-Feb-20 22:06
musefan27-Feb-20 22:06 
GeneralRe: CCC - 2020-02-28 - WINNER! Pin
OriginalGriff27-Feb-20 22:25
mveOriginalGriff27-Feb-20 22:25 
GeneralRe: CCC - 2020-02-28 Pin
MarkTJohnson28-Feb-20 2:56
professionalMarkTJohnson28-Feb-20 2:56 
GeneralRe: CCC - 2020-02-28 Pin
Richard Deeming28-Feb-20 2:59
mveRichard Deeming28-Feb-20 2:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.