Questions tagged [keyboard-hook]

The term keyboard hook covers a range of techniques used to alter or augment the behavior or intercepting keyboard event messages before they reach an application.

The term keyboard hook covers a range of techniques used to alter or augment the behavior or intercepting keyboard event messages before they reach an application.

313 questions
11
votes
1 answer

How to receive keyboard input from application with admin privileges to a non-admin application?

I have programmed an application that has an overlay-kind of window that can be shown and hidden via hotkey while another application has the focus. Said other application is a DirectX game that runs with admin privileges. I have already tried 3…
DNR
  • 1,619
  • 2
  • 14
  • 22
10
votes
2 answers

How to hook Win + Tab using LowLevelKeyboardHook

In a few words: blocking Win up after Win + Tab makes Windows think Win is still down, so then pressing S with the Win key up for example will open the search charm rather than just type "s"... until the user presses Win again. Not blocking it means…
10
votes
1 answer

Receive OS level key-press events in C# application

i dont know a better title for the question , but i`ll illustrate my problem. I am working on application that acts like a mp3 player , it uses the Multimedia keys to play/pause , stop the song , i actually made it work but the FormApplication must…
R.Vector
  • 1,669
  • 9
  • 33
  • 41
9
votes
1 answer

How to tell the difference between a user-tapped keyboard event and a generated one?

I've installed a keyboard hook: CGEventRef myCGEventCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *refcon) { Basically I want to take the user's keyboard taps, eat the input, and post my own input instead. So if he taps…
ck_
  • 3,719
  • 10
  • 49
  • 76
9
votes
3 answers

Is it possible to use Win32 Hooks in Qt applications

I like to know if its possible to use win32 keyboard hook function (SetWindowsHookEx , SetWindowsHookEx ) in a Qt application. If possible pls provide a sample code on using SetWindowsHookEx , SetWindowsHookEx functions in Qt. //Update as of 18 Feb…
Mugunth
  • 2,368
  • 1
  • 21
  • 28
8
votes
3 answers

Low-level Keyboard Hooks/SendInput with Winkey+L possible? (workstation lockout is intercepted in Vista and higher)

I work on a project called UAWKS (Unofficial Apple Wireless Keyboard Support) that helps Windows users use Apple's bluetooth keyboard. One of the main goals of UAWKS is to swap the Cmd key (which behaves as Winkey in Windows) with Ctrl, allowing…
Brian Jorgensen
  • 1,230
  • 14
  • 17
8
votes
2 answers

Can I change a user's keyboard input?

I found this keyboard hook code, which I'm trying to slightly modify for my purposes: http://blogs.msdn.com/toub/archive/2006/05/03/589423.aspx As an overview, I want to have the user press a key, say 'E', and have the keyboard return a different…
ck_
  • 3,719
  • 10
  • 49
  • 76
7
votes
4 answers

wxPython: Catching key events globally

There's something I'm trying to do with wxPython and I can't figure out how. (I'm on Windows 7 and I'm okay with a Windows-only solution.) I want to catch key events globally. This means key-up, key-down and char events. (I'm trying to build…
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
6
votes
1 answer

How to hook external process with SetWindowsHookEx and WH_KEYBOARD

I am trying to hook for example Notepad without sucess. Making a global hook seems to work fine. Testing on XP SP2. Edit: Amended code works now. MyDLL code #include #include #include HINSTANCE hinst; #pragma…
s5804
  • 995
  • 3
  • 12
  • 14
6
votes
1 answer

Windows Global Keyboard Hook - Delphi

I've created a GLOBAL keyboard hook DLL, using source code found on the internet. For the best part it works brilliant, except when it comes to browsers. It picks up every key in the browser except, it seems, when the browser gets focus, it looses…
Paul
  • 157
  • 1
  • 2
  • 14
6
votes
1 answer

Remembering and replaying keystrokes in C# : synchronisation issues

I am a speedrunner (somebody who likes to finish games in the fastest way possible) on PC games and I'd like to record my inputs while I play in order to automatically replay a run later. So I've created a little C# program to do that : basically,…
MetalFoxDoS
  • 399
  • 1
  • 2
  • 11
6
votes
3 answers

Low level keyboard hook & keystrokes from rawinput

Currently, I'm making a program that intercept keystrokes from a specific keyboard (filtered using its HID). So to know which keystrokes have been sent by a specific device, I used the RawInput technic, inspired by this great…
Louisbob
  • 860
  • 3
  • 9
  • 22
5
votes
2 answers

Using JNA or JNI to simulate keys held down in Windows

I want to simulate a keypress in Java. Others have tried this using Robot. This only allows an atomic keypress, where I want to simulate a key hold (for a second, say) and release. So, I need to use JNA or JNI. I investigated JNative, but this…
user1292066
  • 101
  • 3
5
votes
1 answer

Low level keyboard hook set with SetWindowsHookEx stops calling function in C#

I am creating a program that monitors key presses for controlling iTunes globally. It also has a few WinForms (for displaying track information and editing options). The low-level keyboard hook works great for awhile. If I just start up the program,…
5
votes
1 answer

Low level keyboard hook issue with an overlay application

First post here, I've been stewing over the correct solution to this issue for years. I have my own UI engine with its own keyboard handling, and am using it to display a game overlay. The game overlay itself is transparent to both keyboard and…
BoyC
  • 51
  • 1
1
2
3
20 21