Xbutton1 что за кнопка

от admin

Xbutton1 что за кнопка

Начиная с Windows 2000, Microsoft поддерживает Microsoft IntelliMouse® Explorer (Проводник разумной мыши), который является мышью с пятью кнопками. В дополнение к левой, средней и правой кнопкам имеются XBUTTON1 (Х-кнопка1) и XBUTTON2 (Х-кнопка2), которые обеспечивают навигацию вперед и назад, если используется программа Microsoft Internet Explorer.

Диспетчер окна поддерживает XBUTTON1 и XBUTTON2 через посредство сообщений WM_XBUTTON * и WM_NCXBUTTON * . Старшее слово (HIWORD) параметра WPARAM в этих сообщениях содержит флажок, обозначающий, которая Х-кнопка была нажата. Поскольку эти сообщения мыши к тому же помещаются между константами WM_MOUSEFIRST и WM_MOUSELAST , приложение может фильтровать все сообщения мыши при помощи функции GetMessage или PeekMessage .

Windows 2000/XP: Ниже перечислены сообщения, поддерживающие XBUTTON1 и XBUTTON2:

  • WM_APPCOMMAND
  • WM_NCXBUTTONDBLCLK
  • WM_NCXBUTTONDOWN
  • WM_NCXBUTTONUP
  • WM_XBUTTONDBLCLK
  • WM_XBUTTONDOWN
  • WM_XBUTTONUP
  • MOUSEHOOKSTRUCTEX

Ниже перечислены существующие элементы API, которые модифицировались, чтобы поддержать новые кнопки:

  • mouse_event
  • ShellProc
  • MSLLHOOKSTRUCT
  • MOUSEINPUT
  • WM_PARENTNOTIFY

Маловероятно, что дочернее окно в составляющей части приложения, будет в состоянии непосредственно реализовать команды для XBUTTON1 и XBUTTON2. Поэтому DefWindowProc отправляет сообщение WM_APPCOMMAND в окно, когда щелкают X-кнопкой. Функция DefWindowProc также отправляет и сообщение WM_APPCOMMAND в его родительское окно. Это похоже на способ, которым контекстные меню вызываются щелчком правой кнопки — DefWindowProc отправляет сообщение WM_CONTEXTMENU меню, а также отправляет это сообщение и его родителю. Дополнительно, если функция DefWindowProc получает сообщение WM_APPCOMMAND для окна верхнего уровня, то она вызывает фильтр (hook) событий оболочки с кодом HSHELL_APPCOMMAND .

Windows 2000/XP: Включена поддержка клавиатуры, которая имеет дополнительные клавиши для функций браузера, функций средств аудиовизуальной информации, запуска приложения и управления электропитанием. Дополнительную информацию, см. в статье Клавиши клавиатуры для просматривания и других функций.

List of Keys (Keyboard, Mouse and Joystick)

Requires Windows Vista or later. These can be used as hotkeys with some (but not all) mice which have a second wheel or support tilting the wheel to either side. In some cases, software bundled with the mouse must instead be used to control this feature. Regardless of the particular mouse, Send and Click can be used to scroll horizontally in programs which support it.

Keyboard

Note: The names of the letter and number keys are the same as that single letter or digit. For example: b is B and 5 is 5 .

Although any single character can be used as a key name, its meaning (scan code or virtual keycode) depends on the current keyboard layout. Additionally, some special characters may need to be escaped or enclosed in braces, depending on the context. [v1.1.27+]: The letters a-z or A-Z can be used to refer to the corresponding virtual keycodes (usually vk41-vk5A) even if they are not included in the current keyboard layout.

General Keys

Name Description
CapsLock CapsLock (caps lock key)

Note: Windows IME may interfere with the detection and functionality of CapsLock; see CapsLock and IME for details.

Cursor Control Keys

Name Description
ScrollLock ScrollLock (scroll lock key). While Ctrl is held down, ScrollLock produces the key code of CtrlBreak , but can be differentiated from Pause by scan code.
Delete (or Del) Del
Insert (or Ins) Ins
Home Home
End End
PgUp PgUp (page up key)
PgDn PgDn (page down key)
Up ↑ (up arrow key)
Down ↓ (down arrow key)
Left ← (left arrow key)
Right → (right arrow key)

Numpad Keys

Due to system behavior, the following keys separated by a slash are identified differently depending on whether NumLock is ON or OFF. If NumLock is OFF but Shift is pressed, the system temporarily releases Shift and acts as though NumLock is ON.

Name Description
Numpad0 / NumpadIns 0 / Ins
Numpad1 / NumpadEnd 1 / End
Numpad2 / NumpadDown 2 / ↓
Numpad3 / NumpadPgDn 3 / PgDn
Numpad4 / NumpadLeft 4 / ←
Numpad5 / NumpadClear 5 / typically does nothing
Numpad6 / NumpadRight 6 / →
Numpad7 / NumpadHome 7 / Home
Numpad8 / NumpadUp 8 / ↑
Numpad9 / NumpadPgUp 9 / PgUp
NumpadDot / NumpadDel . / Del
NumLock NumLock (number lock key). While Ctrl is held down, NumLock produces the key code of Pause , so use ^Pause in hotkeys instead of ^NumLock .
NumpadDiv / (division)
NumpadMult * (multiplication)
NumpadAdd + (addition)
NumpadSub — (subtraction)
NumpadEnter Enter

Function Keys

Name Description
F1 — F24 The 12 or more function keys at the top of most keyboards.

Modifier Keys

Right Win . Corresponds to the ># hotkey prefix.

Note: Unlike Ctrl / Alt / Shift , there is no generic/neutral «Win» key because the OS does not support it. However, hotkeys with the # modifier can be triggered by either Win .

Right Alt . Corresponds to the >! hotkey prefix.

Note: If your keyboard layout has AltGr instead of RAlt, you can probably use it as a hotkey prefix via <^>! as described here. In addition, LControl & RAlt:: would make AltGr itself into a hotkey.

Multimedia Keys

The function assigned to each of the keys listed below can be overridden by modifying the Windows registry. This table shows the default function of each key on most versions of Windows.

Name Description
Browser_Back Back
Browser_Forward Forward
Browser_Refresh Refresh
Browser_Stop Stop
Browser_Search Search
Browser_Favorites Favorites
Browser_Home Homepage
Volume_Mute Mute the volume
Volume_Down Lower the volume
Volume_Up Increase the volume
Media_Next Next Track
Media_Prev Previous Track
Media_Stop Stop
Media_Play_Pause Play/Pause
Launch_Mail Launch default e-mail program
Launch_Media Launch default media player
Launch_App1 Launch My Computer
Launch_App2 Launch Calculator

Other Keys

Specify for nn the hexadecimal virtual key code of a key. This rarely-used method also prevents certain types of hotkeys from requiring the keyboard hook. For example, the following hotkey does not use the keyboard hook, but as a side-effect it is triggered by pressing either Home or NumpadHome:

Known limitation: VK hotkeys that are forced to use the keyboard hook, such as *VK24 or

VK24 , will fire for only one of the keys, not both (e.g. NumpadHome but not Home ). For more information about the VKnn method, see Special Keys.

Warning: Only Send, GetKeyName(), GetKeyVK(), GetKeySC() and #MenuMaskKey support combining VKnn and SCnnn. [v1.1.27+]: The presence of an invalid suffix prevents VKnn from being recognized. For example, vk1Bsc001:: raises an error in v1.1.27+, but sc001 was ignored (had no effect) in previous versions.

Joystick

Joy1 through Joy32: The buttons of the joystick. To help determine the button numbers for your joystick, use this test script. Note that hotkey prefix symbols such as ^ (control) and + (shift) are not supported (though GetKeyState() can be used as a substitute). Also note that the pressing of joystick buttons always «passes through» to the active window if that window is designed to detect the pressing of joystick buttons.

Although the following Joystick control names cannot be used as hotkeys, they can be used with GetKeyState():

  • JoyX, JoyY, and JoyZ: The X (horizontal), Y (vertical), and Z (altitude/depth) axes of the joystick.
  • JoyR: The rudder or 4th axis of the joystick.
  • JoyU and JoyV: The 5th and 6th axes of the joystick.
  • JoyPOV: The point-of-view (hat) control.
  • JoyName: The name of the joystick or its driver.
  • JoyButtons: The number of buttons supported by the joystick (not always accurate).
  • JoyAxes: The number of axes supported by the joystick.
  • JoyInfo: Provides a string consisting of zero or more of the following letters to indicate the joystick’s capabilities: Z (has Z axis), R (has R axis), U (has U axis), V (has V axis), P (has POV control), D (the POV control has a limited number of discrete/distinct settings), C (the POV control is continuous/fine). Example string: ZRUVPD

Multiple Joysticks: If the computer has more than one joystick and you want to use one beyond the first, include the joystick number (max 16) in front of the control name. For example, 2joy1 is the second joystick’s first button.

Note: If you have trouble getting a script to recognize your joystick, one person reported needing to specify a joystick number other than 1 even though only a single joystick was present. It is unclear how this situation arises or whether it is normal, but experimenting with the joystick number in the joystick test script can help determine if this applies to your system.

See Also:

    Methods of sending keystrokes and mouse clicks with a joystick. : Using a joystick as a mouse.

Hand-held Remote Controls

Respond to signals from hand-held remote controls via the WinLIRC client script.

Special Keys

If your keyboard or mouse has a key not listed above, you might still be able to make it a hotkey by using the following steps:

  1. Ensure that at least one script is running that is using the keyboard hook. You can tell if a script has the keyboard hook by opening its main window and selecting «View->Key history» from the menu bar.
  2. Double-click that script’s tray icon to open its main window.
  3. Press one of the «mystery keys» on your keyboard.
  4. Select the menu item «View->Key history»
  5. Scroll down to the bottom of the page. Somewhere near the bottom are the key-down and key-up events for your key. NOTE: Some keys do not generate events and thus will not be visible here. If this is the case, you cannot directly make that particular key a hotkey because your keyboard driver or hardware handles it at a level too low for AutoHotkey to access. For possible solutions, see further below.
  6. If your key is detectable, make a note of the 3-digit hexadecimal value in the second column of the list (e.g. 159).
  7. To define this key as a hotkey, follow this example:

Reverse direction: To remap some other key to become a «mystery key», follow this example:

Alternate solutions: If your key or mouse button is not detectable by the Key History screen, one of the following might help:

Reconfigure the software that came with your mouse or keyboard (sometimes accessible in the Control Panel or Start Menu) to have the «mystery key» send some other keystroke. Such a keystroke can then be defined as a hotkey in a script. For example, if you configure a mystery key to send Ctrl + F1 , you can then indirectly make that key as a hotkey by using ^F1:: in a script.

Try AHKHID. You can also try searching the forum for a keywords like RawInput* , USB HID or AHKHID .

The following is a last resort and generally should be attempted only in desperation. This is because the chance of success is low and it may cause unwanted side-effects that are difficult to undo:
Disable or remove any extra software that came with your keyboard or mouse or change its driver to a more standard one such as the one built into the OS. This assumes there is such a driver for your particular keyboard or mouse and that you can live without the features provided by its custom driver and software.

CapsLock and IME

Some configurations of Windows IME (such as Japanese input with English keyboard) use CapsLock to toggle between modes. In such cases, CapsLock is suppressed by the IME and cannot be detected by AutoHotkey. However, the Alt + CapsLock , Ctrl + CapsLock and Shift + CapsLock shortcuts can be disabled with a workaround. Specifically, send a key-up to modify the state of the IME, but prevent any other effects by signalling the keyboard hook to suppress the event. The following function can be used for this purpose:

Xbutton1 что за кнопка

Requires Windows Vista or later. These can be used as hotkeys with some (but not all) mice which have a second wheel or support tilting the wheel to either side. In some cases, software bundled with the mouse must instead be used to control this feature. Regardless of the particular mouse, Send and Click can be used to scroll horizontally in programs which support it.

Keyboard

Note: The names of the letter and number keys are the same as that single letter or digit. For example: b is B and 5 is 5 .

Although any single character can be used as a key name, its meaning (scan code or virtual keycode) depends on the current keyboard layout. Additionally, some special characters may need to be escaped or enclosed in braces, depending on the context. [v1.1.27+]: The letters a-z or A-Z can be used to refer to the corresponding virtual keycodes (usually vk41-vk5A) even if they are not included in the current keyboard layout.

General Keys
Name Description
CapsLock CapsLock (caps lock key)

Note: Windows IME may interfere with the detection and functionality of CapsLock; see CapsLock and IME for details.

Cursor Control Keys
Name Description
ScrollLock ScrollLock (scroll lock key). While Ctrl is held down, ScrollLock produces the key code of CtrlBreak , but can be differentiated from Pause by scan code.
Delete (or Del) Del
Insert (or Ins) Ins
Home Home
End End
PgUp PgUp (page up key)
PgDn PgDn (page down key)
Up ↑ (up arrow key)
Down ↓ (down arrow key)
Left ← (left arrow key)
Right → (right arrow key)
Numpad Keys

Due to system behavior, the following keys separated by a slash are identified differently depending on whether NumLock is ON or OFF. If NumLock is OFF but Shift is pressed, the system temporarily releases Shift and acts as though NumLock is ON.

Name Description
Numpad0 / NumpadIns 0 / Ins
Numpad1 / NumpadEnd 1 / End
Numpad2 / NumpadDown 2 / ↓
Numpad3 / NumpadPgDn 3 / PgDn
Numpad4 / NumpadLeft 4 / ←
Numpad5 / NumpadClear 5 / typically does nothing
Numpad6 / NumpadRight 6 / →
Numpad7 / NumpadHome 7 / Home
Numpad8 / NumpadUp 8 / ↑
Numpad9 / NumpadPgUp 9 / PgUp
NumpadDot / NumpadDel . / Del
NumLock NumLock (number lock key). While Ctrl is held down, NumLock produces the key code of Pause , so use ^Pause in hotkeys instead of ^NumLock .
NumpadDiv / (division)
NumpadMult * (multiplication)
NumpadAdd + (addition)
NumpadSub — (subtraction)
NumpadEnter Enter
Function Keys
Name Description
F1 — F24 The 12 or more function keys at the top of most keyboards.
Modifier Keys

Right Win . Corresponds to the ># hotkey prefix.

Note: Unlike Ctrl / Alt / Shift , there is no generic/neutral «Win» key because the OS does not support it. However, hotkeys with the # modifier can be triggered by either Win .

Right Alt . Corresponds to the >! hotkey prefix.

Note: If your keyboard layout has AltGr instead of RAlt, you can probably use it as a hotkey prefix via <^>! as described here. In addition, LControl & RAlt:: would make AltGr itself into a hotkey.

Multimedia Keys

The function assigned to each of the keys listed below can be overridden by modifying the Windows registry. This table shows the default function of each key on most versions of Windows.

Name Description
Browser_Back Back
Browser_Forward Forward
Browser_Refresh Refresh
Browser_Stop Stop
Browser_Search Search
Browser_Favorites Favorites
Browser_Home Homepage
Volume_Mute Mute the volume
Volume_Down Lower the volume
Volume_Up Increase the volume
Media_Next Next Track
Media_Prev Previous Track
Media_Stop Stop
Media_Play_Pause Play/Pause
Launch_Mail Launch default e-mail program
Launch_Media Launch default media player
Launch_App1 Launch My Computer
Launch_App2 Launch Calculator
Other Keys

Specify for nn the hexadecimal virtual key code of a key. This rarely-used method also prevents certain types of hotkeys from requiring the keyboard hook. For example, the following hotkey does not use the keyboard hook, but as a side-effect it is triggered by pressing either Home or NumpadHome:

Known limitation: VK hotkeys that are forced to use the keyboard hook, such as *VK24 or

VK24 , will fire for only one of the keys, not both (e.g. NumpadHome but not Home ). For more information about the VKnn method, see Special Keys.

Warning: Only Send, GetKeyName(), GetKeyVK(), GetKeySC() and #MenuMaskKey support combining VKnn and SCnnn. [v1.1.27+]: The presence of an invalid suffix prevents VKnn from being recognized. For example, vk1Bsc001:: raises an error in v1.1.27+, but sc001 was ignored (had no effect) in previous versions.

Joystick

Joy1 through Joy32: The buttons of the joystick. To help determine the button numbers for your joystick, use this test script. Note that hotkey prefix symbols such as ^ (control) and + (shift) are not supported (though GetKeyState() can be used as a substitute). Also note that the pressing of joystick buttons always «passes through» to the active window if that window is designed to detect the pressing of joystick buttons.

Although the following Joystick control names cannot be used as hotkeys, they can be used with GetKeyState():

  • JoyX, JoyY, and JoyZ: The X (horizontal), Y (vertical), and Z (altitude/depth) axes of the joystick.
  • JoyR: The rudder or 4th axis of the joystick.
  • JoyU and JoyV: The 5th and 6th axes of the joystick.
  • JoyPOV: The point-of-view (hat) control.
  • JoyName: The name of the joystick or its driver.
  • JoyButtons: The number of buttons supported by the joystick (not always accurate).
  • JoyAxes: The number of axes supported by the joystick.
  • JoyInfo: Provides a string consisting of zero or more of the following letters to indicate the joystick’s capabilities: Z (has Z axis), R (has R axis), U (has U axis), V (has V axis), P (has POV control), D (the POV control has a limited number of discrete/distinct settings), C (the POV control is continuous/fine). Example string: ZRUVPD

Multiple Joysticks: If the computer has more than one joystick and you want to use one beyond the first, include the joystick number (max 16) in front of the control name. For example, 2joy1 is the second joystick’s first button.

Note: If you have trouble getting a script to recognize your joystick, one person reported needing to specify a joystick number other than 1 even though only a single joystick was present. It is unclear how this situation arises or whether it is normal, but experimenting with the joystick number in the joystick test script can help determine if this applies to your system.

See Also:

    Methods of sending keystrokes and mouse clicks with a joystick. : Using a joystick as a mouse.

Hand-held Remote Controls

Respond to signals from hand-held remote controls via the WinLIRC client script.

Special Keys

If your keyboard or mouse has a key not listed above, you might still be able to make it a hotkey by using the following steps:

  1. Ensure that at least one script is running that is using the keyboard hook. You can tell if a script has the keyboard hook by opening its main window and selecting «View->Key history» from the menu bar.
  2. Double-click that script’s tray icon to open its main window.
  3. Press one of the «mystery keys» on your keyboard.
  4. Select the menu item «View->Key history»
  5. Scroll down to the bottom of the page. Somewhere near the bottom are the key-down and key-up events for your key. NOTE: Some keys do not generate events and thus will not be visible here. If this is the case, you cannot directly make that particular key a hotkey because your keyboard driver or hardware handles it at a level too low for AutoHotkey to access. For possible solutions, see further below.
  6. If your key is detectable, make a note of the 3-digit hexadecimal value in the second column of the list (e.g. 159).
  7. To define this key as a hotkey, follow this example:

Reverse direction: To remap some other key to become a «mystery key», follow this example:

Alternate solutions: If your key or mouse button is not detectable by the Key History screen, one of the following might help:

Reconfigure the software that came with your mouse or keyboard (sometimes accessible in the Control Panel or Start Menu) to have the «mystery key» send some other keystroke. Such a keystroke can then be defined as a hotkey in a script. For example, if you configure a mystery key to send Ctrl + F1 , you can then indirectly make that key as a hotkey by using ^F1:: in a script.

Try AHKHID. You can also try searching the forum for a keywords like RawInput* , USB HID or AHKHID .

The following is a last resort and generally should be attempted only in desperation. This is because the chance of success is low and it may cause unwanted side-effects that are difficult to undo:
Disable or remove any extra software that came with your keyboard or mouse or change its driver to a more standard one such as the one built into the OS. This assumes there is such a driver for your particular keyboard or mouse and that you can live without the features provided by its custom driver and software.

CapsLock and IME

Some configurations of Windows IME (such as Japanese input with English keyboard) use CapsLock to toggle between modes. In such cases, CapsLock is suppressed by the IME and cannot be detected by AutoHotkey. However, the Alt + CapsLock , Ctrl + CapsLock and Shift + CapsLock shortcuts can be disabled with a workaround. Specifically, send a key-up to modify the state of the IME, but prevent any other effects by signalling the keyboard hook to suppress the event. The following function can be used for this purpose:

[FAQ] Autohotkey (горячие клавиши)

Программа Autohotkey позволяет выполнять действия нажатием клавиши или комбинацией клавиш, кроме того позволяет выполнить несколько действий нажатием одной клавиши.
Скрипты (бинды) пишутся в текстовом файле формата .ahk, где указывается кнопка и её функция.
Для того что бы создать бинд, после установки программы, кликаем правой кнопкой мыши на пустом месте рабочего стола, или в любой папке, далее выбираем создать и Autohotkey Script.
Для того что бы редактировать готовый бинд необходимо нажать правой кнопкой мыши и выбрать «Edit Script».

Русские Блоги

XButton — универсальная кнопка прощания с различными шейп-файлами

Введение в XButton

XButton заменяет различные шейп-файлы, потому что кнопки, которые в основном используются в каждом проекте, не нуждаются в изменении размера, поэтому я написал простой [XButton]

[Ошибка загрузки изображения . (image-7258a7-1530790718680)]

0. Исходный код управления

1. Как цитировать

Ссылка через Maven или Gradle

2. Как пользоваться

Закругленный прямоугольник сущности, необходимо настроить три поля

Полый прямоугольник со скругленными углами, необходимо настроить три поля

3. Изменения версии

Версия V1.3 добавляет функцию управления кодом
Версия V1.4 добавляет настраиваемое свойство XdrawablePadding

Собственный атрибут android: drawablePadding будет работать только в том случае, если ширина или высота, которые мы установили для представления, достаточно малы (чтобы они были сжаты вместе), то есть между изображением и созданным текстом будет пробел. Если ширина или высота вашего представления больше, чем интервал, созданный drawableLeft / drawableRight или drawableTop / drawableBottom, то это свойство, конечно, не будет работать.

Его можно точно рассчитать, настроив вид:

Сначала мы настраиваем атрибут drawablePadding, чтобы установить интервал, и предоставляем методы для внешних вызовов.
Переопределите метод setCompoundDrawablesWithIntrinsicBounds (), чтобы получить установленную ширину для рисования.
Наконец, перепишите метод onLayout, потому что некоторые свойства позиции изменены, и для работы необходимо изменить макет.

Добавьте сюда новую конфигурацию XdrawablePadding

Версия V2.1 добавляет настройки анимации
Версия V2.8 удалила defaultColor и добавила pressTextColor и простое преобразование из твердого шрифта в кнопку типа штриха.

4. Анализ ключевого кода

GradientDrawable можно определить с помощью тега <shape> в XML-файле в каталоге res / drawable. Взгляните на инструкции по определению xml, приведенные в официальном документе.

Настройте GradientDrawable и настройте его в соответствии с его атрибутами, чтобы заменить файлы формы

Собственный атрибут android: drawablePadding будет работать только в том случае, если ширина или высота, которые мы установили для представления, достаточно малы (чтобы они были сжаты вместе), то есть между изображением и созданным текстом будет пробел. Если ширина или высота вашего представления больше, чем интервал, созданный drawableLeft / drawableRight или drawableTop / drawableBottom, то это свойство, конечно, не будет работать.

Его можно точно рассчитать, настроив вид:

Сначала мы настраиваем атрибут drawablePadding, чтобы установить интервал, и предоставляем методы для внешних вызовов.
переписатьsetCompoundDrawablesWithIntrinsicBounds()Метод получения установленной ширины отрисовки.
Наконец перепишитеonLayoutМетод, поскольку некоторые свойства местоположения изменены, для работы необходимо изменить макет.

Читать:
Как проверить сайт на бан в яндексе

Похожие статьи