#[non_exhaustive]pub enum KeyboardAction {
Show 57 variants
PanLeftFast,
PanRightFast,
Undo,
Redo,
OpenQuickSearch,
OpenIntervalSearch,
GoToDate,
Snapshot,
InvertScale,
CopyDrawing,
PasteDrawing,
ToggleDrawings,
MaximizeChart,
CompleteDrawing,
DrawingTool(DrawingToolType),
PanLeft,
PanRight,
PanUp,
PanDown,
ZoomIn,
ZoomOut,
PageUp,
PageDown,
ScrollToRealTime,
ScrollToFirstBar,
FitContent,
ResetZoom,
ResetChart,
ToggleAutoScale,
ToggleLogScale,
TogglePercentageScale,
ToggleCrosshair,
ToggleGrid,
ToggleVolume,
CycleChartType,
ToggleDrawingMode,
DeleteSelectedDrawing,
Cancel,
SetTimeframe1Min,
SetTimeframe5Min,
SetTimeframe15Min,
SetTimeframe30Min,
SetTimeframe1Hour,
SetTimeframe4Hour,
SetTimeframeDaily,
SetTimeframeWeekly,
SetTimeframeMonthly,
CreateAlert,
OpenIndicatorSearch,
OpenSymbolSearch,
SaveLayout,
OpenLayout,
OpenDataWindow,
ToggleSession,
ShowKeyboardHelp,
CycleChartFocus,
CycleChartFocusBack,
}Expand description
Keyboard actions that can be performed on the chart
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
PanLeftFast
Pan left by a page.
PanRightFast
Pan right by a page.
Undo
Undo the last edit.
Redo
Redo the last undone edit.
OpenQuickSearch
Open quick search.
OpenIntervalSearch
Open interval entry.
GoToDate
Go to a date.
Snapshot
Take a chart snapshot.
InvertScale
Invert the price scale.
CopyDrawing
Copy the selected drawing.
PasteDrawing
Paste a copied drawing.
ToggleDrawings
Hide or show drawings.
MaximizeChart
Maximize the active chart.
CompleteDrawing
Complete a multi-point drawing.
DrawingTool(DrawingToolType)
Select a drawing tool. A horizontal, vertical or cross line is placed at once at the pointer when the pointer is over the chart.
PanLeft
Pan left (Left arrow)
PanRight
Pan right (Right arrow)
PanUp
Pan up in the price scale
PanDown
Pan down in the price scale
ZoomIn
Zoom in (+, =)
ZoomOut
Zoom out (-, _)
PageUp
Page up (zoom in more)
PageDown
Page down (zoom out more)
ScrollToRealTime
Scroll to real-time / latest data (Alt+Shift+Right, End)
ScrollToFirstBar
Scroll the oldest bar to the left edge, keeping the zoom (Alt+Shift+Left, Home)
FitContent
Fit content to visible range
ResetZoom
Reset zoom to default
ResetChart
Reset chart (includes zoom and pan) (Alt+R)
ToggleAutoScale
Toggle auto-scale
ToggleLogScale
Toggle logarithmic scale
TogglePercentageScale
Toggle percentage scale
ToggleCrosshair
Toggle crosshair
ToggleGrid
Toggle grid
ToggleVolume
Toggle volume
CycleChartType
Cycle through chart types
ToggleDrawingMode
Enable/disable drawing mode
DeleteSelectedDrawing
Delete the selected drawings, or the selected study when no drawing is selected (Delete, Backspace)
Cancel
Escape/cancel current action (Escape)
SetTimeframe1Min
1-minute timeframe
SetTimeframe5Min
5-minute timeframe
SetTimeframe15Min
15-minute timeframe
SetTimeframe30Min
30-minute timeframe
SetTimeframe1Hour
1-hour timeframe
SetTimeframe4Hour
4-hour timeframe
SetTimeframeDaily
Daily timeframe
SetTimeframeWeekly
Weekly timeframe
SetTimeframeMonthly
Monthly timeframe
CreateAlert
Create alert (Alt+A)
OpenIndicatorSearch
Open indicator search (/)
OpenSymbolSearch
Open symbol search
SaveLayout
Save layout
OpenLayout
Open a saved layout (.)
OpenDataWindow
Show the data window (Alt+D)
ToggleSession
Switch between the regular and extended trading sessions (Alt+Shift+E)
ShowKeyboardHelp
Show keyboard shortcuts help (?)
CycleChartFocus
Cycle focus to next chart (Tab)
CycleChartFocusBack
Cycle focus to previous chart (Shift+Tab)
Implementations§
Source§impl KeyboardAction
impl KeyboardAction
Sourcepub fn from_key_press_with_modifiers(input: &InputState) -> Option<Self>
pub fn from_key_press_with_modifiers(input: &InputState) -> Option<Self>
Scan all key presses in the current input state and return the first matching action.
Sourcepub fn from_key_press(key: Key, modifiers: &Modifiers) -> Option<Self>
pub fn from_key_press(key: Key, modifiers: &Modifiers) -> Option<Self>
Map egui key press to keyboard action Returns None if the key is not mapped
Sourcepub fn desc(&self) -> &str
pub fn desc(&self) -> &str
Human-readable description of the action. Use shortcuts for its bound keys.
Sourcepub fn shortcuts(&self) -> &'static [KeyboardShortcut]
pub fn shortcuts(&self) -> &'static [KeyboardShortcut]
The key combinations for this action, the first of which menus show. Empty for the actions the shortcuts dialog and the menus do not show.
Sourcepub fn shortcut(&self) -> Option<KeyboardShortcut>
pub fn shortcut(&self) -> Option<KeyboardShortcut>
The first of shortcuts, for menus to show with
[egui::Context::format_shortcut].
Sourcepub fn shortcut_key(&self) -> &'static str
pub fn shortcut_key(&self) -> &'static str
Short display text for default bindings. Menus format shortcuts for the platform.
Sourcepub fn all_by_category() -> Vec<(&'static str, Vec<KeyboardAction>)>
pub fn all_by_category() -> Vec<(&'static str, Vec<KeyboardAction>)>
The actions with a bound key, grouped by category (for the shortcuts dialog).
Trait Implementations§
Source§impl Clone for KeyboardAction
impl Clone for KeyboardAction
Source§fn clone(&self) -> KeyboardAction
fn clone(&self) -> KeyboardAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for KeyboardAction
Source§impl Debug for KeyboardAction
impl Debug for KeyboardAction
Source§impl Display for KeyboardAction
impl Display for KeyboardAction
impl Eq for KeyboardAction
Source§impl PartialEq for KeyboardAction
impl PartialEq for KeyboardAction
impl StructuralPartialEq for KeyboardAction
Auto Trait Implementations§
impl Freeze for KeyboardAction
impl RefUnwindSafe for KeyboardAction
impl Send for KeyboardAction
impl Sync for KeyboardAction
impl Unpin for KeyboardAction
impl UnsafeUnpin for KeyboardAction
impl UnwindSafe for KeyboardAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more