pgadmin4/docs/en_US/keyboard_shortcuts.rst
Yosry Muhammad 710d520631 Add support for editing of resultsets in the Query Tool, if the data can be identified as updatable. Fixes #1760
When a query is run in the Query Tool, check if the source of the columns
can be identified as being from a single table, and that we have all
columns that make up the primary key. If so, consider the resultset to
be editable and allow the user to edit data and add/remove rows in the
grid. Changes to data are saved using SAVEPOINTs as part of any
transaction that's in progress, and rolled back if there are integrity
violations, without otherwise affecting the ongoing transaction.

Implemented by Yosry Muhammad as a Google Summer of Code project.
2019-07-17 11:45:20 +01:00

262 lines
17 KiB
ReStructuredText

***************************
`Keyboard Shortcuts`:index:
***************************
Keyboard shortcuts are provided in pgAdmin to allow easy access to specific
functions. Alternate shortcuts can be configured through File > Preferences if
desired.˝
Main Browser Window
*******************
When using main browser window, the following keyboard shortcuts are available:
.. table::
:class: longtable
:widths: 2 3
+----------------------------+-------------------------------------------------------+
| Shortcut for all platforms | Function |
+============================+=======================================================+
| Alt+Shift+F | Open the File menu |
+----------------------------+-------------------------------------------------------+
| Alt+Shift+O | Open the Object menu |
+----------------------------+-------------------------------------------------------+
| Alt+Shift+L | Open the Tools menu |
+----------------------------+-------------------------------------------------------+
| Alt+Shift+H | Open the Help menu |
+----------------------------+-------------------------------------------------------+
| Alt+Shift+B | Focus the browser tree |
+----------------------------+-------------------------------------------------------+
| Alt+Shift+[ | Move tabbed panel backward |
+----------------------------+-------------------------------------------------------+
| Alt+Shift+] | Move tabbed panel forward |
+----------------------------+-------------------------------------------------------+
| Alt+Shift+Q | Open the Query Tool in the current database |
+----------------------------+-------------------------------------------------------+
| Alt+Shift+V | View Data in the selected table/view |
+----------------------------+-------------------------------------------------------+
| Alt+Shift+C | Open the context menu |
+----------------------------+-------------------------------------------------------+
| Alt+Shift+N | Create an object |
+----------------------------+-------------------------------------------------------+
| Alt+Shift+E | Edit object properties |
+----------------------------+-------------------------------------------------------+
| Alt+Shift+D | Delete the object |
+----------------------------+-------------------------------------------------------+
| Alt+Shift+G | Direct debugging |
+----------------------------+-------------------------------------------------------+
Dialog Tabs
***********
Use the shortcuts below to navigate the tabsets on dialogs:
.. table::
:class: longtable
:widths: 2 3
+----------------------------+-------------------------------------------------------+
| Shortcut for all platforms | Function |
+============================+=======================================================+
| Control+Shift+[ | Dialog tab backward |
+----------------------------+-------------------------------------------------------+
| Control+Shift+] | Dialog tab forward |
+----------------------------+-------------------------------------------------------+
Property Grid Controls
**********************
Use the shortcuts below when working with property grid controls:
.. table::
:class: longtable
:widths: 2 3
+----------------------------+-------------------------------------------------------+
| Shortcut for all platforms | Function |
+============================+=======================================================+
| Control+Shift+A | Add row in Grid |
+----------------------------+-------------------------------------------------------+
| Tab | Move focus to the next control |
+----------------------------+-------------------------------------------------------+
| Shift+Tab | Move focus to the previous control |
+----------------------------+-------------------------------------------------------+
| Return | Pick the selected an item in a combo box |
+----------------------------+-------------------------------------------------------+
| Control+Shift+A | Add row in Grid |
+----------------------------+-------------------------------------------------------+
SQL Editors
***********
When using the syntax-highlighting SQL editors, the following shortcuts are available:
.. table::
:class: longtable
:widths: 2 2 3
+--------------------------+----------------------+-------------------------------------+
| Shortcut (Windows/Linux) | Shortcut (Mac) | Function |
+==========================+======================+=====================================+
| Alt + Left | Option + Left | Move to the beginning of the line |
+--------------------------+----------------------+-------------------------------------+
| Alt + Right | Option + Right | Move to the end of the line |
+--------------------------+----------------------+-------------------------------------+
| Ctrl + Alt + Left | Cmd + Option + Left | Move left one word |
+--------------------------+----------------------+-------------------------------------+
| Ctrl + Alt + Right | Cmd + Option + Right | Move right one word |
+--------------------------+----------------------+-------------------------------------+
| Ctrl + / | Cmd + / | Comment selected code (Inline) |
+--------------------------+----------------------+-------------------------------------+
| Ctrl + . | Cmd + . | Uncomment selected code (Inline) |
+--------------------------+----------------------+-------------------------------------+
| Ctrl + Shift + / | Cmd + Shift + / | Comment/Uncomment code (Block) |
+--------------------------+----------------------+-------------------------------------+
| Ctrl + a | Cmd + a | Select all |
+--------------------------+----------------------+-------------------------------------+
| Ctrl + c | Cmd + c | Copy selected text to the clipboard |
+--------------------------+----------------------+-------------------------------------+
| Ctrl + r | Cmd + r | Redo last edit un-done |
+--------------------------+----------------------+-------------------------------------+
| Ctrl + v | Cmd + v | Paste text from the clipboard |
+--------------------------+----------------------+-------------------------------------+
| Ctrl + z | Cmd + z | Undo last edit |
+--------------------------+----------------------+-------------------------------------+
| Tab | Tab | Indent selected text |
+--------------------------+----------------------+-------------------------------------+
| Shift + Tab | Shift + Tab | Un-indent selected text |
+--------------------------+----------------------+-------------------------------------+
| Alt + g | Option + g | Jump (to line:column) |
+--------------------------+----------------------+-------------------------------------+
| Ctrl + Space | Ctrl + Space | Auto-complete |
+--------------------------+----------------------+-------------------------------------+
| Ctrl + f | Cmd + f | Find |
+--------------------------+----------------------+-------------------------------------+
| Ctrl + g | Cmd + g | Find next |
+--------------------------+----------------------+-------------------------------------+
| Ctrl + Shift + g | Cmd + Shift + g | Find previous |
+--------------------------+----------------------+-------------------------------------+
| Ctrl + Shift + f | Cmd + Shift + f | Replace |
+--------------------------+----------------------+-------------------------------------+
Query Tool
**********
When using the Query Tool, the following shortcuts are available:
.. table::
:class: longtable
:widths: 2 2 3
+--------------------------+--------------------+-----------------------------------+
| Shortcut (Windows/Linux) | Shortcut (Mac) | Function |
+==========================+====================+===================================+
| F5 | F5 | Execute query |
+--------------------------+--------------------+-----------------------------------+
| F6 | F6 | Save data changes |
+--------------------------+--------------------+-----------------------------------+
| F7 | F7 | EXPLAIN query |
+--------------------------+--------------------+-----------------------------------+
| Shift + F7 | Shift + F7 | EXPLAIN ANALYZE query |
+--------------------------+--------------------+-----------------------------------+
| F8 | F8 | Execute query to CSV file |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + o | <accesskey> + o | Open file |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + s | <accesskey> + s | Save file |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + n | <accesskey> + n | Find option drop down |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + c | <accesskey> + c | Copy row(s) |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + p | <accesskey> + p | Paste row(s) |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + d | <accesskey> + d | Delete row(s) |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + f | <accesskey> + f | Filter dialog |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + i | <accesskey> + i | Filter options drop down |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + r | <accesskey> + r | Row limit |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + q | <accesskey> + q | Cancel query |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + l | <accesskey> + l | Clear option drop down |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + x | <accesskey> + x | Execute option drop down |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + t | <accesskey> + t | Display connection status |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + y | <accesskey> + y | Copy SQL on history panel |
+--------------------------+--------------------+-----------------------------------+
Debugger
********
When using the Debugger, the following shortcuts are available:
.. table::
:class: longtable
:widths: 2 2 3
+--------------------------+--------------------+-----------------------------------+
| Shortcut (Windows/Linux) | Shortcut (Mac) | Function |
+==========================+====================+===================================+
| <accesskey> + i | <accesskey> + i | Step in |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + o | <accesskey> + o | Step over |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + c | <accesskey> + c | Continue/Restart |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + t | <accesskey> + t | Toggle breakpoint |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + x | <accesskey> + x | Clear all breakpoints |
+--------------------------+--------------------+-----------------------------------+
| <accesskey> + s | <accesskey> + s | Stop |
+--------------------------+--------------------+-----------------------------------+
| Alt + Shift + q | Option + Shift + q | Enter or Edit values in Grid |
+--------------------------+--------------------+-----------------------------------+
Inner Tab and Panel Navigation
******************************
When using the Query Tool and Debugger, the following shortcuts are available
for inner panel navigation:
.. table::
:class: longtable
:widths: 2 2 3
+--------------------------+---------------------------+------------------------------------+
| Shortcut (Windows/Linux) | Shortcut (Mac) | Function |
+==========================+===========================+====================================+
| Alt + Shift + ] | Alt + Shift + ] | Move to next tab within a panel |
+--------------------------+---------------------------+------------------------------------+
| Alt + Shift + [ | Alt + Shift + [ | Move to previous tab within a panel|
+--------------------------+---------------------------+------------------------------------+
| Alt + Shift + Tab | Alt + Shift + Tab | Move between inner panels |
+--------------------------+---------------------------+------------------------------------+
Access Key
**********
<accesskey> is browser and platform dependant. The following table lists the
default access keys for supported browsers.
.. table::
:class: longtable
:widths: 2 1 1 1
+-------------------+-------------+-------------+---------------+
| | Windows | Linux | Mac |
+===================+=============+=============+===============+
| Internet Explorer | Alt | Alt | |
+-------------------+-------------+-------------+---------------+
| Chrome | Alt | Alt | Ctrl + Option |
+-------------------+-------------+-------------+---------------+
| Firefox | Alt + Shift | Alt + Shift | Ctrl + Option |
+-------------------+-------------+-------------+---------------+
| Safari | Alt | | Ctrl + Option |
+-------------------+-------------+-------------+---------------+