Mono.Terminal.Widget.ProcessHotKey C# (CSharp) Method

ProcessHotKey() public method

This method can be overwritten by widgets that want to provide accelerator functionality (Alt-key for example).

Before keys are sent to the widgets on the current Container, all the widgets are processed and the key is passed to the widgets to allow some of them to process the keystroke as a hot-key.

For example, if you implement a button that has a hotkey ok "o", you would catch the combination Alt-o here. If the event is caught, you must return true to stop the keystroke from being dispatched to other widgets.

Typically to check if the keystroke is an Alt-key combination, you would use Curses.IsAlt(key) and then Char.ToUpper(key) to compare with your hotkey.

public ProcessHotKey ( int key ) : bool
key int
return bool
        public virtual bool ProcessHotKey(int key)
        {
            return false;
        }