========================= Key Mapping Configuration ========================= Key mapping configures the key and its action used in *Pyfx*. .. contents:: Table of Content :local: :depth: 2 :backlinks: none Schema ====== Key mapping is configured with the following configuration schema under `view configuration `_. .. code-block:: yaml :linenos: view: keymap: mode: string, accepted_options = ["basic" | "emacs" | "vim"] Basic Mode (Default) ==================== To enable, add the following configuration in your config file: .. code-block:: yaml :linenos: keymap: mode: "basic" Mapped Keys ----------- +------------------+---------------------------------------------------+ | Key | Function | +==================+===================================================+ | q | exit pyfx (except in Query Bar) | +------------------+---------------------------------------------------+ | ? | open help popup (except in Query Bar) | +------------------+---------------------------------------------------+ | **JSON Browser** | +------------------+---------------------------------------------------+ | up | move cursor up one line | +------------------+---------------------------------------------------+ | down | move cursor down one line | +------------------+---------------------------------------------------+ | e | expand all | +------------------+---------------------------------------------------+ | c | collapse all | +------------------+---------------------------------------------------+ | enter | toggle expansion | +------------------+---------------------------------------------------+ | . | enter query window (used to input JSONPath query) | +------------------+---------------------------------------------------+ | **Query Bar** | +------------------+---------------------------------------------------+ | enter | apply JSONPath query and switch to JSON Browser | +------------------+---------------------------------------------------+ | esc | cancel query and restore to state before query | +------------------+---------------------------------------------------+ | **Autocomplete PopUp** | +------------------+---------------------------------------------------+ | up | move cursor up one line | +------------------+---------------------------------------------------+ | down | move cursor down one line | +------------------+---------------------------------------------------+ | enter | select option and complete the query | +------------------+---------------------------------------------------+ | esc | close pop up | +------------------+---------------------------------------------------+ | **Help PopUp** | +------------------+---------------------------------------------------+ | up | move cursor up one line | +------------------+---------------------------------------------------+ | down | move cursor down one line | +------------------+---------------------------------------------------+ | esc | close pop up | +------------------+---------------------------------------------------+ Emacs Mode ========== To enable, add the following configuration in your config file: .. code-block:: yaml :linenos: keymap: mode: "emacs" Mapped Keys ----------- +------------------+---------------------------------------------------+ | Key | Function | +==================+===================================================+ | ctrl x ctrl c | exit pyfx | +------------------+---------------------------------------------------+ | ? | open help popup (except in Query Bar) | +------------------+---------------------------------------------------+ | **JSON Browser** | +------------------+---------------------------------------------------+ | ctrl p | move cursor up one line | +------------------+---------------------------------------------------+ | ctrl n | move cursor down one line | +------------------+---------------------------------------------------+ | ctrl x e | expand all | +------------------+---------------------------------------------------+ | ctrl x c | collapse all | +------------------+---------------------------------------------------+ | enter | toggle expansion | +------------------+---------------------------------------------------+ | meta x | enter query window (used to input JSONPath query) | +------------------+---------------------------------------------------+ | **Query Bar** | +------------------+---------------------------------------------------+ | enter | apply JSONPath query and switch to JSON Browser | +------------------+---------------------------------------------------+ | ctrl g | cancel query and restore to state before query | +------------------+---------------------------------------------------+ | **Autocomplete PopUp** | +------------------+---------------------------------------------------+ | meta p | move cursor up one line | +------------------+---------------------------------------------------+ | meta n | move cursor down one line | +------------------+---------------------------------------------------+ | enter | select option and complete the query | +------------------+---------------------------------------------------+ | ctrl g | close pop up | +------------------+---------------------------------------------------+ | **Help PopUp** | +------------------+---------------------------------------------------+ | up | move cursor up one line | +------------------+---------------------------------------------------+ | down | move cursor down one line | +------------------+---------------------------------------------------+ | ctrl x 0 | close pop up | +------------------+---------------------------------------------------+ Vim Mode ======== To enable, add the following configuration in your config file: .. code-block:: yaml :linenos: keymap: mode: "vim" Mapped Keys ----------- +------------------+---------------------------------------------------+ | Key | Function | +==================+===================================================+ | q | exit pyfx (except in Query Bar) | +------------------+---------------------------------------------------+ | ? | open help popup (except in Query Bar) | +------------------+---------------------------------------------------+ | **JSON Browser** | +------------------+---------------------------------------------------+ | k | move cursor up one line | +------------------+---------------------------------------------------+ | j | move cursor down one line | +------------------+---------------------------------------------------+ | e | expand all | +------------------+---------------------------------------------------+ | c | collapse all | +------------------+---------------------------------------------------+ | enter | toggle expansion | +------------------+---------------------------------------------------+ | : | enter query window (used to input JSONPath query) | +------------------+---------------------------------------------------+ | **Query Bar** | +------------------+---------------------------------------------------+ | enter | apply JSONPath query and switch to JSON Browser | +------------------+---------------------------------------------------+ | esc | cancel query and restore to state before query | +------------------+---------------------------------------------------+ | **Autocomplete PopUp** | +------------------+---------------------------------------------------+ | k | move cursor up one line | +------------------+---------------------------------------------------+ | j | move cursor down one line | +------------------+---------------------------------------------------+ | enter | select option and complete the query | +------------------+---------------------------------------------------+ | esc | close pop up | +------------------+---------------------------------------------------+ | **Help PopUp** | +------------------+---------------------------------------------------+ | k | move cursor up one line | +------------------+---------------------------------------------------+ | j | move cursor down one line | +------------------+---------------------------------------------------+ | esc | close pop up | +------------------+---------------------------------------------------+