Perhapsthe correct thing to do would just be to change it so that the existing keycode field does what you need? Those values already vary between platforms, so as long as the enum constants like KeyPress::F1Key etc are correct, then that might work?
// Note that the actual values of these are platform-specific and may change // without warning, so don't store them anywhere as constants. For persisting/retrieving // KeyPress objects, use getTextDescription() and createFromDescription() instead.
// Note that the actual values of these are platform-specific and may change // without warning, so don't store them anywhere as constants. For persisting/retrieving // KeyPress objects, use getTextDescription() and createFromDescription() instead.[/quote]
Basically, I like the idea that jules had about using the already existing keycode field to contain the unique and platform dependent keypress description. At that point, if I understand conrrectly, the difficult part would be to make getTextDescription() and createFromDescription() play nicely with each other using an agnostic String representation of the keypress.
User keycodes are associated to an individual account and have the advantage of controlling each user's permissions to arm/disarm the alarm system through their unique keycode and site permissions.
General keycodes are not associated with an individual account; instead, they are given a generic name and are used for one alarm site only. The objective is to create a generic keycode for a group of people to use, such as janitorial staff or a master keycode in case of emergencies for that specific alarm site.
Required. You must have the alarms user permission to use this code tied to a user account. However, if you are a Site Admin, you are an alarm user, by default, for that site. This allows you to give users permission to arm and disarm a site and limit camera viewing.
Keycodes are constants that uniquely identify the ASCII values of device keypresses (hard or soft). Android apps made with Enterprise Browser 1.4 and higher permit Android keycode values to be assigned from a file when an Enterprise Browser app starts up. Note: The keycodes for keys with multiple values accessed with the shift or other modifier key (such as upper and lower case) might not be capturable. See the KeyCapture API remarks for more information.
Note: The WorkAbout Pro 4 and Omnii XT15 are among a small group of Zebra devices running Windows Mobile that return proprietary keycode values inconsistent with those of other devices and incompatible with Windows. To address this issue, apps made with Enterprise Browser 1.5 or higher can remap those proprietary keycodes to Microsoft standard codes. See the Mapping Proprietary Function Keycodes section below.
On Android devices, the keycode values of certain keys are sometimes not returned as expected or desired. To ensure control and accuracy of key presses, the desired keycode value(s) can be assigned through the current KeyCapture 4.x API as well as legacy 2.x versions. The steps in thie guide apply to all API versions.
Note: The 'from' field refers to the key's current keycode value; the 'to' will hold the value that replaces it. In the example above, pressing the '0' key (after mapping) will generate a keycode value of '0x30' instead of its former value of '7.' The 'name' field can hold any value; standard Android key names are recommended.
Once it is determined that correct keypresses are generating incorrect keycodes, the incorrect keycode value must be determined before the correct one can be substituted. This process uses JavaScript to expose the keycodes that appear when pressing one or more keys.
The function keys of certain Zebra devices running Windows Mobile, including the WorkAbout Pro 4 and Omnii XT15 (with Windows Embedded Handheld 6.5), return a proprietary set of Unicode values via Windows character messages rather than the values expected from Windows keydown/keyup messages. For example, pressing the F1 key returns the hexadecimal value E001 (57345 decimal) rather than the hex value 0x70 (112 decimal) as generally expected. This can lead to compatibility issues for Enterprise Browser apps when running on such devices with Windows Mobile.
Use this template to map a single function key to a specific Microsoft keycode value. For example, to map the F1 key to a Microsoft virtual keycode, specify the proprietary Unicode value in hexadecimal (0xE001) first, followed by the Microsoft virtual keycode value in hexadecimal (0x70) as shown below:
To map multiple function key to Microsoft keycode values, simply repeat the SET_FUNCTION_KEY_TO_STANDARD_MS_VALUE (child tag) statements above within the FUNCTION_KEY_MAPPING_TO_STANDARD_MS_VALUE root tag. The example below maps the F1 through F5 function keys:
I made a secret agent textbased puzzle game in which you'll need to put the correct answer in a textbox. When the given answer is correct you can proceed to the next page. This works perfectly but only when you press the button with a mouseclick.
because the "fancy" quotes you have currently won't work. You need to use standard quote markers instead. (If you're copying the code from a Word document or something, that's a problem you'll need to watch out for.)
Anyways, for what you want, this bit of code will find the textbox, and then add an event to it which watches for the "ENTER" key (key code 13), and then triggers the click on the button when the "ENTER" key is hit:
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.
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.
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.
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:
Joy1 through Joy32: The buttons of the controller. To help determine the button numbers for your controller, 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 controller buttons always "passes through" to the active window if that window is designed to detect the pressing of controller buttons.
Multiple controllers: If the computer has more than one controller and you want to use one beyond the first, include the controller number (max 16) in front of the control name. For example, 2joy1 is the second controller's first button.
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.
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.
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:
On my Lenovo IdeaPad Yoga 2 Pro on Windows, there is a function available Fn+F6 that should turn the touchpad on and off (I would like to map the correct key to the script here on askubuntu).
I tried showkey -a, showkey -k and xev which both shows most keys codes when pressed, but at Fn+F6 they stay quiet. The other Fn+F1-F5 show output, only F6 doesn't, although it works on Windows. What other alternatives are there to xev and showkey?
I found this Arch Linux wiki articled titled: Lenovo Ideapad Yoga 2 Pro, which would seem to be showing that this key isn't directly being mapped. Will continue digging but thought I'd add this info here as well.
I found this page titled: Lenovo IdeaPad Yoga 2 Pro on the LinLap Wiki. The article discusses a patched version of the ideapad_laptop module which may resolve your issues with certain keys not working.
Blacklist ideapad_laptop to get it to work, by adding blacklist ideapad_laptop to /etc/modprobe.d/blacklist.conf. The patched ideapad_laptop module available from -laptop in the yoga_laptop directory makes wireless work correctly and also handles the Airplane Mode key.
3a8082e126