gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.Gdk.Keys

Description

A `KeyVal` is a numeric value identifying a keyboard key. The defined values can be found at <http: The names of the keys are the names of the macros without the prefix.

Synopsis

- type KeyVal = Word32
- type KeyCode = Word16
- keyName :: KeyVal -> DefaultGlibString
- keyFromName :: DefaultGlibString -> KeyVal
- keyToChar :: KeyVal -> Maybe Char
- keyvalName :: KeyVal -> IO DefaultGlibString
- keyvalFromName :: DefaultGlibString -> IO KeyVal
- keyvalToChar :: KeyVal -> IO (Maybe Char)
- keyvalConvertCase :: KeyVal -> (KeyVal, KeyVal)
- keyvalToUpper :: KeyVal -> KeyVal
- keyvalToLower :: KeyVal -> KeyVal
- keyvalIsUpper :: KeyVal -> Bool
- keyvalIsLower :: KeyVal -> Bool

# Documentation

type KeyVal = Word32 Source #

Key values are the codes which are sent whenever a key is pressed or released.

type KeyCode = Word16 Source #

keyName :: KeyVal -> DefaultGlibString Source #

Converts a key value into a symbolic name.

keyFromName :: DefaultGlibString -> KeyVal Source #

Converts a key name to a key value.

keyToChar Source #

Arguments

:: KeyVal | `keyval` - a Gdk key symbol
-> Maybe Char | returns the corresponding unicode character, or Nothing if there is no corresponding character.

Convert from a Gdk key symbol to the corresponding Unicode character.

keyvalName :: KeyVal -> IO DefaultGlibString Source #

keyvalFromName :: DefaultGlibString -> IO KeyVal Source #

keyvalToChar :: KeyVal -> IO (Maybe Char) Source #

keyvalConvertCase Source #

Arguments

:: KeyVal | `symbol` a keyval
-> (KeyVal, KeyVal) | `(lower, upper)` ^ lower is the lowercase version of symbol. ^ upper is uppercase version of symbol.

Obtains the upper- and lower-case versions of the keyval symbol. Examples of keyvals are GDK_a, `Enter`, `F1`, etc.

keyvalToUpper Source #

Arguments

:: KeyVal | `keyval` a key value.
-> KeyVal | returns the upper case form of keyval, or keyval itself if it is already in upper case or it is not subject to case

Converts a key value to upper case, if applicable.

keyvalToLower Source #

Arguments

:: KeyVal | `keyval` a key value.
-> KeyVal | returns the lower case form of keyval, or keyval itself if it is already in lower case or it is not subject to case

Converts a key value to lower case, if applicable.

keyvalIsUpper Source #

Arguments

:: KeyVal |
-> Bool | returns `True` if keyval is in upper case, or if keyval is not subject to case conversion.

Returns `True` if the given key value is in upper case.

keyvalIsLower Source #

Arguments

:: KeyVal |
-> Bool | returns `True` if keyval is in upper case, or if keyval is not subject to case conversion.

Returns `True` if the given key value is in upper case.