Keyboard shortcuts
Overview
This article lists shortcuts built in Advanced Charts and Trading Platform. It also explains how to override the default shortcuts and specify custom ones.
The shortcut dialog that can be seen on tradingview.com is not available in the libraries. Therefore, you need to implement a custom dialog if necessary.
Advanced Charts shortcuts
The shortcuts below are available in Advanced Charts and Trading Platform.
On macOS, you can use ⌘/⌥/⇧ instead of Ctrl/Alt/Shift.
Chart
You can use the following shortcuts to interact with the chart.
Action | Shortcut |
---|---|
Open Quick Search | Ctrl + K |
Open indicators | / |
Load chart layout | . |
Save chart layout | Ctrl + S |
Undo | Ctrl + Z |
Redo | Ctrl + Y |
Change symbol | Start typing a symbol name |
Change interval | Digit or , |
Move chart 1 bar to the left | ← |
Move chart 1 bar to the right | → |
Move chart to the left/right | Shift + Mouse wheel |
Zoom in | Ctrl + ↑ |
Zoom out | Ctrl + ↓ |
Move further to the left | Ctrl + ← |
Move further to the right | Ctrl + → |
Toggle maximize pane | Double-click the pane |
Toggle collapse pane | Ctrl + Double-click the pane |
Go to date | Alt + G |
Take snapshot, saving URL to clipboard | Alt + S |
Reset chart | Alt + R |
Invert series scale | Alt + I |
Enable/disable logarithmic series scale | Alt + L |
Enable/disable percent series scale | Alt + P |
Zoom in focused area | Ctrl + Mouse wheel |
Start keyboard navigation | Alt + Z Tab if accessible_keyboard_shortcuts is enabled |
Indicators and drawings
You can use the following shortcuts to interact with indicators and drawings.
Action | Shortcut |
---|---|
Partially erase drawing | Eraser + Ctrl |
Enable Gann box fixed increments | Hold Shift |
Enable measure tool | Hold Shift + Click |
Copy selected object | Ctrl + C |
Paste object | Ctrl + V |
Temporary turn on/off magnet mode | Ctrl + Move a point |
Hide all drawings | Ctrl + Alt + H |
Clone a drawing | Ctrl + Drag |
Select multiple drawings | Hold Ctrl + Click |
Move a drawing horizontally or vertically | Drag + Shift |
Move selected drawing left | ← |
Move selected drawing right | → |
Move selected drawing up | ↑ |
Move selected drawing down | ↓ |
Draw Trend line | Alt + T |
Draw Horizontal line | Alt + H |
Draw Vertical line | Alt + V |
Draw Cross line | Alt + C |
Draw Fib retracement | Alt + F |
Draw Rectangle | Alt + Shift + R |
Draw Square | Rectangle + Shift |
Draw Circle | Ellipse + Shift |
Draw 45 degrees angle or horizontal | Trend line or Channel + Shift |
Trading Platform shortcuts
The shorcuts below are available in Trading Platform only.
Chart
You can use the following shortcuts to interact with the chart.
Action | Shortcut |
---|---|
Switch between charts | Tab Shift + → if accessible_keyboard_shortcuts is enabled |
Switch between charts in reverse order | Shift + Tab Shift + ← if accessible_keyboard_shortcuts is enabled |
Toggle maximize chart | Alt + Enter or Alt + Click |
Add symbol to watchlist | Alt + W |
Watchlist
You can use the following shortcuts to interact with watchlist.
Action | Shortcut |
---|---|
Switch to next symbol | ↓ or Space |
Switch to previous symbol | ↑ or Shift + Space |
Select all symbols | Ctrl + A |
Select next symbol | Shift + ↓ |
Select previous symbol | Shift + ↑ |
Trading
You can use the following shortcuts to trade.
Action | Shortcut |
---|---|
Place market order to buy | Shift + B |
Place market order to sell | Shift + S |
Place limit order | Click the Depth of Market (DOM) cell |
Place limit order to buy | Shift + Alt + B |
Place limit order to sell | Shift + Alt + S |
Place stop order | Ctrl + Click the DOM cell |
Center DOM data | Shift + Alt + C |
Manage shortcuts
Starting from Advanced Charts version 31, the shortcut system only accepts key code–based definitions.
Definitions using printable-character strings, such as "alt+q"
, will no longer be supported.
Modifier keys like ctrl
, alt
, shift
, and meta
/command
can still be written as strings.
Transition to key code-based shortcuts (v31)
Starting from version 31, all shortcuts must use numeric key codes for non-modifier keys.
This replaces previous character-literal definitions (e.g., "alt+q"
, "/"
, "+"
), which are now deprecated and will no longer work in future versions.
This change:
- Unifies the shortcut API across different keyboard layouts.
- Eliminates ambiguities between characters that map to the same physical key.
To update your code, follow the steps below.
- Identify all
widget.onShortcut()
calls that pass printable characters as a single string or inside an array. - Replace each character with its corresponding numeric key code taken from the
KeyboardEvent.keyCode
orwhich
property. For convenience, use a lookup tool like Key code reference. - Keep modifier keys (
ctrl
,alt
,shift
, andmeta
/command
) as lowercase strings. - Test the shortcuts under v31 to confirm the callbacks are triggered.
Override shortcuts
The onShortcut
method allows you to override the built‑in shortcuts or specify custom ones. To do this, pass a keyboard shortcut and a callback function as parameters. The shortCut
parameter depends on the key types:
-
Before v31: If a shortcut consists of a modifier and alphabet keys, you could pass a string and use
+
as a separator. Note that this format will be deprecated starting from version 31.// ⚠️ Will be deprecated in v31
widget.onShortcut("alt+q", function() {
widget.chart().executeActionById("symbolSearch");
}); -
If a shortcut consists of a modifier and alphabet keys, pass them as an array — the modifier as a string, and the key as its numeric code.
// alt + q
widget.onShortcut(["alt", 81], function() {
widget.chart().executeActionById("symbolSearch");
});
// ctrl + shift + /
widget.onShortcut(["ctrl", "shift", 220], function() {
widget.chart().executeActionById("symbolSearch");
});
Disable shortcuts
The shortcuts listed below can be disabled using the corresponding featureset:
- Open indicators using
insert_indicator_dialog_shortcut
- Save chart layout using
save_shortcut