


In some GTK-based environments, auto-repeat dispatches a native key-up event automatically during auto-repeat, and there's no way for Gecko to know the difference between a repeated series of keypresses and an auto-repeat. Auto-repeat on some GTK environments such as Ubuntu 9.4

There are some caveats, however, as described below. This is what the DOM Level 3 specification says should happen. This results in a sequence of events similar to the following being dispatched: When a key is pressed and held down, it begins to auto-repeat. This may be the empty string if the browser or device doesn't know the keyboard's locale. Returns a string representing a locale string indicating the locale the keyboard is configured for. Returns a string representing the key value of the key represented by the event. Returns a boolean value that is true if the event is fired between after compositionstart and before compositionend. Returns a boolean value that is true if the Ctrl key was active when the key event was generated. If you want to display the correct keystrokes to the user, you can use Keyboard.getLayoutMap(). Warning: This ignores the user's keyboard layout, so that if the user presses the key at the "Y" position in a QWERTY keyboard layout (near the middle of the row above the home row), this will always return "KeyY", even if the user has a QWERTZ keyboard (which would mean the user expects a "Z" and all the other properties would indicate a "Z") or a Dvorak keyboard layout (where the user would expect an "F"). Key, and the decimal point on the keypad. Group and is always encoded with the locationĮxamples include the digits on the numeric keypad, the keypad's Enter The key is located on the numeric keypad, or is a virtual keyĪssociated with the numeric keypad if there's more than one place the The key is one which may exist in multiple positions on the keyboardĪnd, in this case, is located on the right side of the keyboard.Įxamples include the right Shift key and the right Alt key (Option on Macintosh keyboard, or the left Shift key. The key is one which may exist in multiple locations on the keyboardĪnd, in this instance, is on the left side of the keyboard.Įxamples include the left Control key, the left Command key on a Reason, not to be associated with that location.Įxamples include alphanumeric keys on the standard PC 101 US keyboard, On the left and right sides of the keyboard, the key is, for whatever Keypad (unless it's the NumLock key), and for keys that are duplicated Particular area of the keyboard it is not located on the numeric The key described by the event is not identified as being located in a They are accessed as KeyboardEvent.DOM_KEY_LOCATION_STANDARD and so forth. The following constants identify which part of the keyboard the key event originates from.
