ChartKeyboardEventArgs
class cAlgo.API
DesktopCLICloud
Provides data for chart keyboard related events and callbacks
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 class ChartKeyboardEventArgs
Namespace: cAlgo.API · Group: EventArgs
Examples
protected override void OnStart()
{
Chart.KeyDown += OnChartKeyDown;
}
private void OnChartKeyDown(ChartKeyboardEventArgs args)
{
Print("Key: {0} | Modifiers: {1} | Ctrl: {2} | Shift: {3} | Alt: {4}", args.Key, args.Modifiers, args.CtrlKey, args.ShiftKey, args.AltKey);
}
def on_start(self):
api.Chart.KeyDown += self.on_chart_key_down
def on_chart_key_down(self, args):
api.Print(f"Key: {args.Key} | Modifiers: {args.Modifiers} | Ctrl: {args.CtrlKey} | Shift: {args.ShiftKey} | Alt: {args.AltKey}")
Properties
| Name | Description |
|---|---|
AltKeyDesktopCLICloudbool | True if Alt key was pressed otherwise False |
ChartDesktopCLICloudChart | The chart that the event/callback occurred |
CtrlKeyDesktopCLICloudbool | True if Ctrl key was pressed otherwise False |
KeyDesktopCLICloudKey | Keyboard key |
ModifiersDesktopCLICloudModifierKeys | Modifiers key that was used with the Key |
ShiftKeyDesktopCLICloudbool | True if Shift key was pressed otherwise False |