/**
 * Note: The order of the modifier keys in many of the [foo]Shortcut()
 * functions in this file are intentional and should not be changed. They're
 * designed to fit with the standard menu keyboard shortcuts shown in the
 * user's platform.
 *
 * For example, on MacOS menu shortcuts will place Shift before Command, but
 * on Windows Control will usually come first. So don't provide your own
 * shortcut combos directly to keyboardShortcut().
 */
/**
 * Internal dependencies
 */
import { isAppleOS } from './platform';
/**
 * External dependencies
 */
import type { KeyboardEvent as ReactKeyboardEvent } from 'react';
export type WPModifierPart = typeof ALT | typeof CTRL | typeof COMMAND | typeof SHIFT;
export type WPKeycodeModifier = 'primary' | 'primaryShift' | 'primaryAlt' | 'secondary' | 'access' | 'ctrl' | 'alt' | 'ctrlShift' | 'shift' | 'shiftAlt' | 'undefined';
/**
 * An object of handler functions for each of the possible modifier
 * combinations. A handler will return a value for a given key.
 */
export type WPModifierHandler<T> = Record<WPKeycodeModifier, T>;
export type WPKeyHandler<T> = (character: string, isApple?: () => boolean) => T;
export type WPEventKeyHandler = (event: ReactKeyboardEvent<HTMLElement> | KeyboardEvent, character: string, isApple?: () => boolean) => boolean;
export type WPModifier = (isApple: () => boolean) => WPModifierPart[];
/**
 * Keycode for BACKSPACE key.
 */
export declare const BACKSPACE = 8;
/**
 * Keycode for TAB key.
 */
export declare const TAB = 9;
/**
 * Keycode for ENTER key.
 */
export declare const ENTER = 13;
/**
 * Keycode for ESCAPE key.
 */
export declare const ESCAPE = 27;
/**
 * Keycode for SPACE key.
 */
export declare const SPACE = 32;
/**
 * Keycode for PAGEUP key.
 */
export declare const PAGEUP = 33;
/**
 * Keycode for PAGEDOWN key.
 */
export declare const PAGEDOWN = 34;
/**
 * Keycode for END key.
 */
export declare const END = 35;
/**
 * Keycode for HOME key.
 */
export declare const HOME = 36;
/**
 * Keycode for LEFT key.
 */
export declare const LEFT = 37;
/**
 * Keycode for UP key.
 */
export declare const UP = 38;
/**
 * Keycode for RIGHT key.
 */
export declare const RIGHT = 39;
/**
 * Keycode for DOWN key.
 */
export declare const DOWN = 40;
/**
 * Keycode for DELETE key.
 */
export declare const DELETE = 46;
/**
 * Keycode for F10 key.
 */
export declare const F10 = 121;
/**
 * Keycode for ALT key.
 */
export declare const ALT = "alt";
/**
 * Keycode for CTRL key.
 */
export declare const CTRL = "ctrl";
/**
 * Keycode for COMMAND/META key.
 */
export declare const COMMAND = "meta";
/**
 * Keycode for SHIFT key.
 */
export declare const SHIFT = "shift";
/**
 * Keycode for ZERO key.
 */
export declare const ZERO = 48;
export { isAppleOS };
/**
 * Object that contains functions that return the available modifier
 * depending on platform.
 */
export declare const modifiers: WPModifierHandler<WPModifier>;
/**
 * An object that contains functions to get raw shortcuts.
 *
 * These are intended for use with the KeyboardShortcuts.
 *
 * @example
 * ```js
 * // Assuming macOS:
 * rawShortcut.primary( 'm' )
 * // "meta+m"
 * ```
 */
export declare const rawShortcut: WPModifierHandler<WPKeyHandler<string>>;
/**
 * An object that contains functions to get shortcuts in a format compatible
 * with the [`aria-keyshortcuts` HTML attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-keyshortcuts).
 *
 * **Note**: The provided shortcut character strings (ie. not the modifiers) should follow
 * the values specified in the [UI Events KeyboardEvent key Values spec](https://www.w3.org/TR/uievents-key/) — for example, "Enter", "Tab", "ArrowRight", "PageDown",
 * "Escape", "Plus", or "F1". The spacebar key should be represented with the
 * "Space" string (an exception to the UI Events KeyboardEvent key Values spec).
 *
 * @see https://www.w3.org/TR/wai-aria-1.2/#aria-keyshortcuts
 * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-keyshortcuts
 * @see https://www.w3.org/TR/uievents-key/
 *
 * @example
 * ```js
 * // Assuming macOS:
 * ariaKeyShortcut.primary( 'm' )
 * // "Meta+M"
 *
 * ariaKeyShortcut.primaryAlt( 'm' )
 * // "Meta+Alt+M"
 *
 * // Assuming Windows:
 * ariaKeyShortcut.primary( 'm' )
 * // "Control+M"
 *
 * ariaKeyShortcut.primaryAlt( 'm' )
 * // "Control+Alt+M"
 *
 * ariaKeyShortcut.primaryShift( 'del' )
 * // "Control+Shift+Delete"
 * ```
 */
export declare const ariaKeyShortcut: WPModifierHandler<WPKeyHandler<string>>;
/**
 * Return an array of the parts of a keyboard shortcut chord for display.
 *
 * @example
 * ```js
 * // Assuming macOS:
 * displayShortcutList.primary( 'm' );
 * // [ "⌘", "M" ]
 * ```
 *
 * Keyed map of functions to shortcut sequences.
 */
export declare const displayShortcutList: WPModifierHandler<WPKeyHandler<string[]>>;
/**
 * An object that contains functions to display shortcuts.
 *
 * @example
 * ```js
 * // Assuming macOS:
 * displayShortcut.primary( 'm' );
 * // "⌘M"
 * ```
 *
 * Keyed map of functions to display shortcuts.
 */
export declare const displayShortcut: WPModifierHandler<WPKeyHandler<string>>;
/**
 * An object that contains functions to return an aria label for a keyboard
 * shortcut.
 *
 * @example
 * ```js
 * // Assuming macOS:
 * shortcutAriaLabel.primary( '.' );
 * // "Command + Period"
 * ```
 *
 * Keyed map of functions to shortcut ARIA labels.
 */
export declare const shortcutAriaLabel: WPModifierHandler<WPKeyHandler<string>>;
/**
 * An object that contains functions to check if a keyboard event matches a
 * predefined shortcut combination.
 *
 * @example
 * ```js
 * // Assuming an event for ⌘M key press:
 * isKeyboardEvent.primary( event, 'm' );
 * // true
 * ```
 *
 * Keyed map of functions to match events.
 */
export declare const isKeyboardEvent: WPModifierHandler<WPEventKeyHandler>;
//# sourceMappingURL=index.d.ts.map