at ViewController
function hello.
func hello()
{
print("hello")
}
register keyboard shortcut for func hello.
let key = KeyConfig.setFuncWithModal(message: "hello method: ", f: hello)
call function from keyboard through keyDown:event
override func keyDown(with event: NSEvent) {
KeyConfig.callShortCutFunc(event)
}