monomer-1.1.0.0: A GUI library for writing native Haskell applications.
Copyright(c) 2018 Francisco Vallarino
LicenseBSD-3-Clause (see the LICENSE file)
Maintainerfjvallarino@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Monomer.Event.Util

Description

Utility functions for event handling.

Synopsis

Documentation

isShiftPressed :: KeyMod -> Bool Source #

Checks if Shift key is pressed.

isCtrlPressed :: KeyMod -> Bool Source #

Checks if Ctrl key is pressed.

isAltPressed :: KeyMod -> Bool Source #

Checks if Alt key is pressed.

isGUIPressed :: KeyMod -> Bool Source #

Checks if Winddows/Cmd key is pressed.

isOnClick :: SystemEvent -> Bool Source #

Checks if it's a Click event.

isOnButtonAction :: SystemEvent -> Bool Source #

Checks if it's a ButtonAction event.

isOnWheelScroll :: SystemEvent -> Bool Source #

Checks if it's a WheelScroll event.

isOnKeyAction :: SystemEvent -> Bool Source #

Checks if it's a KeyAction event.

isOnTextInput :: SystemEvent -> Bool Source #

Checks if it's a TextInput event.

isOnClipboard :: SystemEvent -> Bool Source #

Checks if it's a Clipboard event.

isOnFocus :: SystemEvent -> Bool Source #

Checks if it's a Focus event.

isOnBlur :: SystemEvent -> Bool Source #

Checks if it's a Blur event.

isOnEnter :: SystemEvent -> Bool Source #

Checks if it's an Enter event.

isOnMove :: SystemEvent -> Bool Source #

Checks if it's a Move event.

isOnLeave :: SystemEvent -> Bool Source #

Checks if it's a Leave event.

isOnDrag :: SystemEvent -> Bool Source #

Checks if it's a Drag event.

isOnDrop :: SystemEvent -> Bool Source #

Checks if it's a Drop event.

checkKeyboard :: SystemEvent -> (KeyMod -> KeyCode -> KeyStatus -> Bool) -> Bool Source #

Appplies a provided function to test a KeyAction event