Homepage: http://www.emacswiki.org/emacs/download/one-key.el
Author: Andy Stewart, rubikitch
Updated:
Easy access configurable popup menus to display keybindings and other things
Bitcoin donations gratefully accepted: 1HnSqGHrVenb1t2V2aijyocWyZcd7qt1k With so many Emacs extensions, you have a lot of keystrokes to remember, and you probably forget most of them. This package fixes that problem, and helps new users to learn the common keybindings. One Key provides a single keystroke that when pressed presents you with a menu of choices in a popup window for commands to execute with a further keystroke. By default menus for common prefix keys and commands are defined. Just type one of the listed keystrokes to execute the corresponding command. You can delete, edit, sort, highlight and filter the menu items, add new menu items and even add new menus. You can have access to several different menus from the same window which can be navigated with the arrow keys. Such a collection of menus is called a menu set and you can define several different menu sets containing different types of menus. Several different types of menus are defined (and more may be added) for holding different types of menu items. For example the "major-mode" type opens the menu corresponding to the current major-mode. More different types are defined by one-key extension libraries (e.g. `one-key-dir' for fast directory tree navigation), or you can create your own types. See "Creating menus" below. The *One-Key* buffer: Running the command `one-key-open-associated-menu-set' or `one-key-open-menu-set' opens the *One-Key* buffer. (these commands may be bound to keys - see "Installation" below). Within the *One-Key* buffer you will see a list of command descriptions each with a corresponding key in square brackets to its left. Pressing the key executes the command. Along the top of the buffer in the header line you will see a list of menu names. One of these names will be highlighted and indicates the current menu. You can navigate between the different menus by pressing the left/right arrow keys (unless these have been redefined to other keys in `one-key-special-keybindings', see below). You can toggle the size of the window holding the *One-Key* buffer by pressing the appropriate special key (see below). The window size is toggled between default size, large size (so that all items fit in the window), and hidden (window is closed, but one-key is still active). This is useful if there are a large number of items in the menu, or when you need to see part of the buffer that is obscured by the *One-Key* window. By default one-key will quit and the *One-Key* window will close after pressing a key corresponding to one of the menu items. If you want one-key to stay active after pressing an item key you should toggle the menu persistence by pressing the appropriate special key (C-menu by default, see "Special keybindings" below). To quit one-key and close the *One-Key* window press ESC. If you want to quit but keep the window open (e.g. to see the keybindings for a major mode), press C-ESC. Special keybindings: For each different type of menu certain "special" keybindings are defined which activate menu specific commands, such as sorting or editing the menu items, adding new menus, etc. These special keybindings are specific to each menu type, though many of them will be the same for all menu types. For example the arrow keys are defined as special keybindings for navigating around menus. Pressing the f1 key displays a help message listing all the special keybindings for the current menu. By default, when a menu is created one-key will ensure that the keys corresponding to menu items do not clash with the special keybindings for that menu type. However, if for some reason there is a clash then the menu item gets priority over the special keybinding unless the help window is displayed (by pressing f1), in which case the special keybinding gets priority. You can alter or add new special keybindings by customizing `one-key-special-keybindings', and `one-key-default-special-keybindings'. Extension libraries (such as `one-key-dir' or `one-key-regs') may also define customizable special keys specific to the menu type defined in the library. By default the following special keybindings are defined: ESC : Quit and close menu window: Quit, but keep menu window open : Toggle menu persistence