<?php

/**
 * Registers and unregisters global keyboard shortcuts on client side
 *
 * @version DR1.5
 */
class HotKey {



	/**
	 * Registers a global keyboard shortcut
	 *
	 * @param IActionAdapter action adapter to be run on keyboard shortcut occurence
	 * @param string the shortcut itself
	 */
	public static function register(IActionAdapter $a, $shortcut) {
		$response = ResponseContext::getInstance();
		$response->HotKey->register($shortcut, $a->__toString());
	}



	/**
	 * Unregisters previously registered global keyboard shortcut
	 *
	 * @param string shortcut to be unregistered
	 */
	public static function unregister($shortcut) {
		$response = ResponseContext::getInstance();
		$response->HotKey->unregister($shortcut);
	}



} // class HotKey

?>