ChartKeyboardEventArgs.ShiftKey
property · ChartKeyboardEventArgs · cAlgo.API
DesktopCLICloud
True if Shift key was pressed otherwise False
Environment behaviour
CLI — not supported. Never raised in the CLI: the events that pass it never fire there (Chart.KeyDown).
Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (Chart.KeyDown).
Definition
public bool ShiftKey {get;}
chartKeyboardEventArgs.ShiftKey: bool
Returns bool
Examples
protected override void OnStart()
{
Chart.KeyDown += OnChartKeyDown;
}
private void OnChartKeyDown(ChartKeyboardEventArgs args)
{
if (args.ShiftKey)
Print("Shift + {0} pressed", args.Key);
}
def on_start(self):
api.Chart.KeyDown += self.on_chart_key_down
def on_chart_key_down(self, args):
if args.ShiftKey:
api.Print(f"Shift + {args.Key} pressed")