Клавиша WIN
Модераторы: Duncon, Hawk, Romeo, Eugie
Доброе время суток. Имеется ли способ отключения клавиши WIN? Т.е. меню пуск не должно выскакивать при нажатии на оную. Заранее спасибки...
Хук можно поставить, см. SetWindowsHookEx(WH_KEYBOARD_LL,...)
Хук пробовал-всё равно сначала вылетает меню пуск-а потом происходит переопределённое действие...=(
Вариант через реестр:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\KeyBoard
Layout\Scancode Map
It's a binary value that lets you map keystrokes in the low-level keyboard
drivers in NT. As a result you don't have to worry about applications
bypassing mappings that you've done at a higher level (i.e. it just works).
Here's the format of the value:
Each mapping DWORD has two parts: the input scancode, and an output
scancode. To map scancode 0x1d (left control) to scancode 0x3a (caps
lock), you want a value of 0x003a001d. Note that this does not swap the
keys. Using just this mapping value, both the left control and the caps
lock key will behave as caps-lock. To swap, you also need to map 0x3a to
0x1d, using 0x001d003a. So, the complete registry value you'd use to swap
left-control and caps-lock is:
00 00 00 00 00 00 00 00 03 00 00 00 1d 00 3a 00 3a 00 1d 00 00 00 00 00
Сканкоды виндовых клавиш сам надеюсь наёдешь
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\KeyBoard
Layout\Scancode Map
It's a binary value that lets you map keystrokes in the low-level keyboard
drivers in NT. As a result you don't have to worry about applications
bypassing mappings that you've done at a higher level (i.e. it just works).
Here's the format of the value:
Код: Выделить всё
DWORD: 0x00000000 header
DWORD: 0x00000000 header
DWORD: length (in DWORDs) of remaining data, including terminating DWORD
DWORD: mapping 1
...
DWORD: mapping n
DWORD: 0x00000000 terminating null DWORD
scancode. To map scancode 0x1d (left control) to scancode 0x3a (caps
lock), you want a value of 0x003a001d. Note that this does not swap the
keys. Using just this mapping value, both the left control and the caps
lock key will behave as caps-lock. To swap, you also need to map 0x3a to
0x1d, using 0x001d003a. So, the complete registry value you'd use to swap
left-control and caps-lock is:
00 00 00 00 00 00 00 00 03 00 00 00 1d 00 3a 00 3a 00 1d 00 00 00 00 00
Сканкоды виндовых клавиш сам надеюсь наёдешь

Даже самый дурацкий замысел можно воплотить мастерски
Надо же, не знал о такой возможности. Впрочем, MSDN знает все - ну или почти все

To disable the Windows key, do the following steps:
1. Click Start, click Run, type regedt32, and then click OK.
2. On the Windows menu, click HKEY_LOCAL_ MACHINE on Local Machine.
3. Click the System\CurrentControlSet\Control folder, and then double-click the Keyboard Layout folder.
4. On the Edit menu, click Add Value, type in Scancode Map, click REG_BINARY as the Data Type, and then click OK.
5. Type 00000000000000000300000000005BE000005CE000000000 in the Data field, and then click OK.
6. Close the Registry Editor and restart the computer.
2 Eugie:
Слушай,я что-то не понял-надо добавить параметр в разделе Keboard Layot типа Reg_Binary? И как его заполнить такими данными-вручную? И ещё- как его назвать? Возможно я ошибаюсь везде =) Подскажи плиз как именно это сделать... Спасибки заранее
Слушай,я что-то не понял-надо добавить параметр в разделе Keboard Layot типа Reg_Binary? И как его заполнить такими данными-вручную? И ещё- как его назвать? Возможно я ошибаюсь везде =) Подскажи плиз как именно это сделать... Спасибки заранее
Да именно так и нужно сделать. Если оставишь свое мыло, вышлю соответствующий reg-файл, чтобы не набивать binary value вручную.
Отправил. Не забудь перезагрузиться после изменения реестра.
спасиби говорим! То что надо!