mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 21:44:31 +00:00
Started hotkey support.
svn path=/trunk/; revision=6515
This commit is contained in:
parent
bca263eb73
commit
bf68eefdd1
|
@ -1196,14 +1196,12 @@ NtUserRegisterClassExWOW(CONST WNDCLASSEXW* lpwcx,
|
|||
DWORD Unknown4,
|
||||
DWORD Unknown5);
|
||||
|
||||
|
||||
DWORD
|
||||
BOOL
|
||||
STDCALL
|
||||
NtUserRegisterHotKey(
|
||||
DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3);
|
||||
NtUserRegisterHotKey(HWND hWnd,
|
||||
int id,
|
||||
UINT fsModifiers,
|
||||
UINT vk);
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
|
@ -1720,11 +1718,10 @@ NtUserUnregisterClass(
|
|||
DWORD Unknown1,
|
||||
DWORD Unknown2);
|
||||
|
||||
DWORD
|
||||
BOOL
|
||||
STDCALL
|
||||
NtUserUnregisterHotKey(
|
||||
DWORD Unknown0,
|
||||
DWORD Unknown1);
|
||||
NtUserUnregisterHotKey(HWND hWnd,
|
||||
int id);
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: stubs.c,v 1.46 2003/11/02 06:58:57 navaraf Exp $
|
||||
/* $Id: stubs.c,v 1.47 2003/11/02 16:32:45 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING WINBOOLthe top level directory
|
||||
* PROJECT: ReactOS user32.dll
|
||||
|
@ -293,20 +293,6 @@ RegisterDeviceNotificationW(
|
|||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
WINBOOL
|
||||
STDCALL
|
||||
RegisterHotKey(
|
||||
HWND hWnd,
|
||||
int id,
|
||||
UINT fsModifiers,
|
||||
UINT vk)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
|
@ -386,20 +372,6 @@ UnregisterDeviceNotification(
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
WINBOOL
|
||||
STDCALL
|
||||
UnregisterHotKey(
|
||||
HWND hWnd,
|
||||
int id)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: input.c,v 1.19 2003/10/09 06:13:04 gvg Exp $
|
||||
/* $Id: input.c,v 1.20 2003/11/02 16:32:25 ekohl Exp $
|
||||
*
|
||||
* PROJECT: ReactOS user32.dll
|
||||
* FILE: lib/user32/windows/input.c
|
||||
|
@ -335,10 +335,24 @@ OemKeyScan(WORD wOemChar)
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
WINBOOL
|
||||
STDCALL
|
||||
SetDoubleClickTime(
|
||||
UINT uInterval)
|
||||
WINBOOL STDCALL
|
||||
RegisterHotKey(HWND hWnd,
|
||||
int id,
|
||||
UINT fsModifiers,
|
||||
UINT vk)
|
||||
{
|
||||
return (WINBOOL)NtUserRegisterHotKey(hWnd,
|
||||
id,
|
||||
fsModifiers,
|
||||
vk);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
WINBOOL STDCALL
|
||||
SetDoubleClickTime(UINT uInterval)
|
||||
{
|
||||
return (WINBOOL)NtUserSystemParametersInfo(SPI_SETDOUBLECLICKTIME,
|
||||
uInterval,
|
||||
|
@ -455,6 +469,17 @@ UnloadKeyboardLayout(HKL hkl)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
WINBOOL STDCALL
|
||||
UnregisterHotKey(HWND hWnd,
|
||||
int id)
|
||||
{
|
||||
return (WINBOOL)NtUserUnregisterHotKey(hWnd, id);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.81 2003/10/28 19:30:08 gvg Exp $
|
||||
# $Id: makefile,v 1.82 2003/11/02 16:33:51 ekohl Exp $
|
||||
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
|
@ -48,14 +48,13 @@ MISC_OBJECTS = misc/driver.o misc/error.o misc/math.o misc/object.o
|
|||
|
||||
LDR_OBJECTS = ldr/loader.o
|
||||
|
||||
NTUSER_OBJECTS = ntuser/caret.o ntuser/class.o ntuser/guicheck.o ntuser/hook.o \
|
||||
ntuser/message.o ntuser/msgqueue.o ntuser/stubs.o \
|
||||
ntuser/userobj.o ntuser/window.o ntuser/winsta.o ntuser/menu.o \
|
||||
ntuser/input.o ntuser/keyboard.o ntuser/callback.o \
|
||||
ntuser/winpos.o ntuser/painting.o ntuser/metric.o \
|
||||
ntuser/windc.o ntuser/prop.o ntuser/scrollbar.o \
|
||||
ntuser/timer.o ntuser/misc.o ntuser/vis.o \
|
||||
ntuser/winlock.o
|
||||
NTUSER_OBJECTS = ntuser/callback.o ntuser/caret.o ntuser/class.o ntuser/guicheck.o \
|
||||
ntuser/hook.o ntuser/hotkey.o ntuser/input.o ntuser/keyboard.o \
|
||||
ntuser/menu.o ntuser/message.o ntuser/metric.o ntuser/misc.o \
|
||||
ntuser/msgqueue.o ntuser/painting.o ntuser/prop.o ntuser/scrollbar.o \
|
||||
ntuser/stubs.o ntuser/timer.o ntuser/userobj.o ntuser/vis.o \
|
||||
ntuser/windc.o ntuser/window.o ntuser/winlock.o ntuser/winpos.o\
|
||||
ntuser/winsta.o
|
||||
|
||||
OBJECTS_OBJECTS = objects/bitmaps.o objects/brush.o objects/cliprgn.o \
|
||||
objects/color.o objects/coord.o objects/dc.o \
|
||||
|
|
67
reactos/subsys/win32k/ntuser/hotkey.c
Normal file
67
reactos/subsys/win32k/ntuser/hotkey.c
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* ReactOS W32 Subsystem
|
||||
* Copyright (C) 2003 ReactOS Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: hotkey.c,v 1.1 2003/11/02 16:33:33 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PURPOSE: HotKey support
|
||||
* FILE: subsys/win32k/ntuser/hotkey.c
|
||||
* PROGRAMER: Eric Kohl
|
||||
* REVISION HISTORY:
|
||||
* 02-11-2003 EK Created
|
||||
*/
|
||||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <win32k/win32k.h>
|
||||
#include <win32k/userobj.h>
|
||||
#include <include/msgqueue.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
|
||||
BOOL STDCALL
|
||||
NtUserRegisterHotKey(HWND hWnd,
|
||||
int id,
|
||||
UINT fsModifiers,
|
||||
UINT vk)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
BOOL STDCALL
|
||||
NtUserUnregisterHotKey(HWND hWnd,
|
||||
int id)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* EOF */
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: input.c,v 1.15 2003/10/18 20:41:10 vizzini Exp $
|
||||
/* $Id: input.c,v 1.16 2003/11/02 16:33:33 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -102,8 +102,8 @@ KeyboardThreadMain(PVOID StartContext)
|
|||
KEY_EVENT_RECORD KeyEvent;
|
||||
LPARAM lParam = 0;
|
||||
BOOLEAN SysKey;
|
||||
|
||||
Status = NtReadFile (KeyboardDeviceHandle,
|
||||
|
||||
Status = NtReadFile (KeyboardDeviceHandle,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -112,9 +112,9 @@ KeyboardThreadMain(PVOID StartContext)
|
|||
sizeof(KEY_EVENT_RECORD),
|
||||
NULL,
|
||||
NULL);
|
||||
DPRINT( "KeyRaw: %s %04x\n",
|
||||
KeyEvent.bKeyDown ? "down" : "up",
|
||||
KeyEvent.wVirtualScanCode );
|
||||
DPRINT( "KeyRaw: %s %04x\n",
|
||||
KeyEvent.bKeyDown ? "down" : "up",
|
||||
KeyEvent.wVirtualScanCode );
|
||||
|
||||
if (Status == STATUS_ALERTED && !InputThreadsRunning)
|
||||
{
|
||||
|
@ -125,9 +125,9 @@ KeyboardThreadMain(PVOID StartContext)
|
|||
DPRINT1("Win32K: Failed to read from keyboard.\n");
|
||||
return; //(Status);
|
||||
}
|
||||
|
||||
SysKey = KeyEvent.dwControlKeyState & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED);
|
||||
DPRINT( "Key: %s\n", KeyEvent.bKeyDown ? "down" : "up" );
|
||||
|
||||
SysKey = KeyEvent.dwControlKeyState & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED);
|
||||
DPRINT( "Key: %s\n", KeyEvent.bKeyDown ? "down" : "up" );
|
||||
|
||||
/*
|
||||
* Post a keyboard message.
|
||||
|
@ -138,19 +138,19 @@ KeyboardThreadMain(PVOID StartContext)
|
|||
((KeyEvent.wVirtualScanCode << 16) & 0x00FF0000) | 0x40000000;
|
||||
|
||||
/* Bit 24 indicates if this is an extended key */
|
||||
if (KeyEvent.dwControlKeyState & ENHANCED_KEY)
|
||||
{
|
||||
lParam |= (1 << 24);
|
||||
}
|
||||
if (KeyEvent.dwControlKeyState & ENHANCED_KEY)
|
||||
{
|
||||
lParam |= (1 << 24);
|
||||
}
|
||||
|
||||
if (SysKey)
|
||||
{
|
||||
lParam |= (1 << 29); /* Context mode. 1 if ALT if pressed while the key is pressed */
|
||||
}
|
||||
if (SysKey)
|
||||
{
|
||||
lParam |= (1 << 29); /* Context mode. 1 if ALT if pressed while the key is pressed */
|
||||
}
|
||||
|
||||
MsqPostKeyboardMessage(SysKey ? WM_SYSKEYDOWN : WM_KEYDOWN,
|
||||
KeyEvent.wVirtualKeyCode,
|
||||
lParam);
|
||||
MsqPostKeyboardMessage(SysKey ? WM_SYSKEYDOWN : WM_KEYDOWN,
|
||||
KeyEvent.wVirtualKeyCode,
|
||||
lParam);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -158,16 +158,18 @@ KeyboardThreadMain(PVOID StartContext)
|
|||
((KeyEvent.wVirtualScanCode << 16) & 0x00FF0000) | 0xC0000000;
|
||||
|
||||
/* Bit 24 indicates if this is an extended key */
|
||||
if (KeyEvent.dwControlKeyState & ENHANCED_KEY)
|
||||
{
|
||||
lParam |= (1 << 24);
|
||||
}
|
||||
if (KeyEvent.dwControlKeyState & ENHANCED_KEY)
|
||||
{
|
||||
lParam |= (1 << 24);
|
||||
}
|
||||
|
||||
if (SysKey)
|
||||
{
|
||||
lParam |= (1 << 29); /* Context mode. 1 if ALT if pressed while the key is pressed */
|
||||
}
|
||||
MsqPostKeyboardMessage(SysKey ? WM_SYSKEYUP : WM_KEYUP, KeyEvent.wVirtualKeyCode,
|
||||
if (SysKey)
|
||||
{
|
||||
lParam |= (1 << 29); /* Context mode. 1 if ALT if pressed while the key is pressed */
|
||||
}
|
||||
|
||||
MsqPostKeyboardMessage(SysKey ? WM_SYSKEYUP : WM_KEYUP,
|
||||
KeyEvent.wVirtualKeyCode,
|
||||
lParam);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: stubs.c,v 1.30 2003/10/15 20:48:19 weiden Exp $
|
||||
/* $Id: stubs.c,v 1.31 2003/11/02 16:33:33 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -850,18 +850,6 @@ NtUserQueryUserCounters(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserRegisterHotKey(
|
||||
DWORD Unknown0,
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
|
@ -1025,17 +1013,6 @@ NtUserUnloadKeyboardLayout(
|
|||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserUnregisterHotKey(
|
||||
DWORD Unknown0,
|
||||
DWORD Unknown1)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserUpdateInputContext(
|
||||
|
|
Loading…
Reference in a new issue