F
F
Flumaster2014-11-21 00:55:42
C++ / C#
Flumaster, 2014-11-21 00:55:42

C# how to interrupt another program's ALT + F4 press event?

I play WoW, I'm sick on alt + 4, sometimes I miss, you yourself understand which key. There is a program Keyboard Maniac, it interrupts the event, but I need a smaller program. How in C# to implement ignoring ALT + F4 when pressed in another program?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Pukhov, 2014-11-21
@Neuroware

Look in the direction of the hook for keyboard events, it’s easy to find a working example in Google (I found it 3 times), the point is that you can subscribe to this event and if the program catches it before others (which depends on a bunch of factors), then you can send the status to the system that the event is processed (pressing a key) and the reaction is not required, then this event will not come to WoW and therefore there will be no problems. Although I would just remove the heal from 4 buttons and put something more rare :)

A
aush, 2014-11-21
@aush

autohotkey

#IfWinActive, WoW
{
  !F4::Send !4
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question