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
0
votes
1 answer

Global low level keyboard hook not preventing OEM keys

I have written the following method that prevents all keys from being pressed: private IntPtr HookHandler(int nCode, IntPtr wParam, ref KBDLLHOOKSTRUCT lParam) { if (nCode >= 0) { ... //Return a nonzero value to prevent the…
Gabriel McAdams
  • 56,921
  • 12
  • 61
  • 77
0
votes
1 answer

KeyHook in another thread

In my C# app I want to do the keyhook but so, that the method invoked when the key is pressed is invoked in another thread. In this way it will not happen, that a key is omitted by my program, because my application was busy with something else. How…
0
votes
1 answer

Global Keyboard hook call back function

I am trying to write a simple keylogger program by using global keyboard hooks. I need somehelp in implementing the keyboard hook callback function. My function as of now works but cannot handle the case when a key is pressed and not released.…
Ashish Kumar Shah
  • 512
  • 1
  • 9
  • 26
0
votes
1 answer

Global Hotkeys - C#

I have built an application which listens for a global hot key (Alt + Space currently), when I press the hot key when Google Chrome is in focus it brings my app to focus but also opens Chrome's context menu (right click menu). I used the following…
Nathan Smith
  • 8,271
  • 3
  • 27
  • 44
-1
votes
1 answer

What should i put in DLL when using it to create global hook?

I'm creating a global hook but the problem is that it needs a DLL but i don't know anything about DLL. So what should i include in the dll file?
Mike
  • 89
  • 1
  • 4
  • 11
-1
votes
2 answers

Keep HOOK running

I am trying to set hook on keyboard with SetWindowsHookEx and I want the program to keep running so I added while(TRUE) after the hook setted. int main() { SetHook(); while (TRUE) { } return 0; } Now, this is not working for me…
-1
votes
2 answers

Disable windows keys in a node webkit application?

One of my new application i need to disable window keys so, Any one knows how to disable left and right window key in a node web kit application ?
Sandeep Ks
  • 504
  • 3
  • 13
-1
votes
1 answer

Unexpected behavior after keyboard hook in visual C++

I'm working on a project in visual c++ 2012 update 3. I need to hook keyboard for a little time and allow user to type in a password only. So i disable all keys except those required to type a password. It works well. But after unHooking the alt key…
Jasir
  • 677
  • 1
  • 8
  • 26
-2
votes
1 answer

Press enter to export Keyboard Hook message

I've written a program to get keyboard hook. What I want is, when a user presses Enter, the typed text, for example: "hello world", which I stored in exportMsg, should be returned from the function. I want to make a dll and export exportMsg. Here is…
Zues
  • 11
  • 5
-2
votes
2 answers

Understanding GetMessage() in combination with a LowLevelKeyboardProc Hook

I am trying to understand how to init a LowLevelKeyboardProc hook. In my minimal approach for a key logger as shown below, why do I need the message-loop to get the hook working even if it just hangs within the first loop and never prints "MSG\r\n"…
hurm
  • 11
  • 2
-2
votes
1 answer

Low Level keyboard hook c++

I tried to create an application in c++ that sets a low level keyboard hook and each time the user presses a key it will write a char of a string I made. Can someone explain how can I change the user input without using the keybd_event function…
Yonatan Kreiner
  • 105
  • 1
  • 1
  • 10
-3
votes
1 answer

C# toggle Capslock off with KeyboardHook

private static IntPtr KeyboardHookCallback(int nCode, IntPtr wParam, IntPtr lParam) { int vkCode = Marshal.ReadInt32(lParam); if (nCode >= 0 && wParam == (IntPtr)KeyboardMessages.WM_KEYDOWN) { …
koin
  • 203
  • 2
  • 12
-3
votes
1 answer

Keyboard hooking

I'm trying to write in c program which analyzes statistically the using of some keyboard keys. First I want to create a keylogger using global hook and log it to file. Here is the first part of the code i wrote: #include #include…
1 2 3
20
21