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
3
votes
2 answers

Global low level keyboard hook - Race Condition

I have written a c# application that contains a WinAPI low level keyboard hook that I use to prevent all but alphanumeric keys. The problem is - other programs (those that start at login) also have keyboard hooks (to start applications such as…
Gabriel McAdams
  • 56,921
  • 12
  • 61
  • 77
3
votes
3 answers

Why does pressing Ctrl+"+" produce a beep in a TextBox?

I am Working with C# and Windows Forms and want to use Ctrl+"Oemplus" as a function key for my application. I use a German keyboard and this key is located 2 keys right of the letter P (that ist then "+"). Whenever I press this key in combination…
DySoS
  • 105
  • 1
  • 6
3
votes
4 answers

SetWindowsHookEx with WH_KEYBOARD doesn't work for me, what do I wrong?

#include #include #define _WIN32_WINNT 0x501 #include using namespace std; HHOOK hKeyboardHook = 0; LRESULT CALLBACK KeyboardCallback(int code,WPARAM wParam,LPARAM lParam) { cout << "a key was pressed" <<…
rsk82
  • 28,217
  • 50
  • 150
  • 240
3
votes
3 answers

Ignore mouse click and send keyboard Input to external application

How do I simulate keystrokes when mouse is clicked in a legacy program. NOTE! The program may not know that the mouse is clicked I'm experimenting with IntPtr module = LoadLibrary("user32.dll"); _mouseHookHandle = (HookType.MouseLowLevel,…
magol
  • 6,135
  • 17
  • 65
  • 120
3
votes
1 answer

I need global keyboard listener in java for Mac

I know that you can listen for keyboard with JIntellitype in Windows but is there something similar for Mac? Thank.
Karuvägistaja
  • 293
  • 1
  • 8
  • 17
3
votes
1 answer

Low level keyboard Hook not at UI thread

I want to create a good library for keyboard hook. I use a method SetWindowsHookEx and I have noticed that method hookProc, which should be called at any system KeyDown event, is not executed if the main thread of my app is bussy. I think the hook…
2
votes
1 answer

How do you get the current keyboard state globally? (i.e. what keys are currently depressed regardless of if the inquiring application has focus)

I'm writing a screen capture utility, and I'd like to be able to store the current state of the keyboard and mouse whenever a screenshot is taken. Doing this for the mouse is simple, since using the PointerInfo class in a manner described in this…
zergylord
  • 4,368
  • 5
  • 38
  • 60
2
votes
1 answer

Is it possible to disable Ctrl+V in windows?

How can i disable Ctrl+V shortcut-key in windows and handle it by my own application? Actually , i want to ignore it and send another key instead of Ctrl+V.
Kermia
  • 4,171
  • 13
  • 64
  • 105
2
votes
1 answer

Call Int 13h in a ISR

I have written a ISR for int 9h by assembly in Real Mode. In this ISR, I call INT 13h, AH=0x02 for writing some data on Hard Disk. But data aren't written on Hard Disk. Also int 13h, ah=0x02 doesn't work too (Read data from Hard Disk). after call…
CoyBit
  • 1,592
  • 1
  • 17
  • 19
2
votes
4 answers

global keyboard hook slowing down computer

I am using the code from this article : private const int WH_KEYBOARD_LL = 13; private const int WM_KEYDOWN = 0x0100; private static LowLevelKeyboardProc _proc = HookCallback; private static IntPtr _hookID = IntPtr.Zero; public static void…
brutton
  • 31
  • 1
  • 4
2
votes
1 answer

How to hook copy actions in windows

I know how to write and use windows hook DLLs to capture things such as window messages on a window. What I need to do is capture any copy (Control+C or other method) done on the system in any application. Is there a quick simple way to do this…
Rocky Pulley
  • 22,531
  • 20
  • 68
  • 106
2
votes
0 answers

Strange scancode 02 2A (554) on SendInput LShift

I have written a program to use an external (wireless) numpad as an input device for gaming. I am using NUMPAD0, NUMPAD. and ENTER for the modifier keys shift, ctrl and alt respectively and I've keymapped the rest of the numpad keys to WASD and some…
luksen
  • 67
  • 5
2
votes
1 answer

How do I replace a keystroke with jQuery?

I need to be able to replace a keystroke with jQuery. When the right arrow is pressed, I want the tab key to be pressed instead. So far I have: