Skip to content

Instantly share code, notes, and snippets.

@MangelMaxime
Created August 3, 2017 20:59
Show Gist options
  • Save MangelMaxime/787be53a75acc226f90dced9e277aa94 to your computer and use it in GitHub Desktop.
Save MangelMaxime/787be53a75acc226f90dced9e277aa94 to your computer and use it in GitHub Desktop.
let keyboardCaptureHandler (keyboard: Keyboard.Record) =
match keyboard.Modifiers with
| { Control = true } ->
match keyboard.LastKey with
| Keyboard.Keys.O ->
window2.Closed <- false
true // Key has been captured
| _ -> false
| _ ->
match keyboard.LastKey with
| Keyboard.Keys.Escape ->
if not window2.Closed then
window2.Closed <- true
true // Key has been captured
| _ -> false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment