gi-ibus-1.5.2: IBus bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.IBus.Objects.Keymap

Description

An IBusKeymap defines the mapping between keyboard scancodes and keyboard symbols such as numbers, alphabets, and punctuation marks.

Some input methods assume certain keyboard layout (such as Chewing and Wubi requires an US-QWERTY layout), and expect key symbols to be arranged in that order. These input methods should new an IBusKeymap instance and define the keyboard layout. Then keymapLookupKeysym can convert scancodes back to the key symbols.

see_also: Component, EngineDesc

Synopsis

Exported types

newtype Keymap Source #

Memory-managed wrapper type.

Constructors

Keymap (ManagedPtr Keymap) 

Instances

Instances details
Eq Keymap Source # 
Instance details

Defined in GI.IBus.Objects.Keymap

Methods

(==) :: Keymap -> Keymap -> Bool

(/=) :: Keymap -> Keymap -> Bool

GObject Keymap Source # 
Instance details

Defined in GI.IBus.Objects.Keymap

ManagedPtrNewtype Keymap Source # 
Instance details

Defined in GI.IBus.Objects.Keymap

Methods

toManagedPtr :: Keymap -> ManagedPtr Keymap

TypedObject Keymap Source # 
Instance details

Defined in GI.IBus.Objects.Keymap

Methods

glibType :: IO GType

IsGValue Keymap Source #

Convert Keymap to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.IBus.Objects.Keymap

Methods

toGValue :: Keymap -> IO GValue

fromGValue :: GValue -> IO Keymap

HasParentTypes Keymap Source # 
Instance details

Defined in GI.IBus.Objects.Keymap

type ParentTypes Keymap Source # 
Instance details

Defined in GI.IBus.Objects.Keymap

type ParentTypes Keymap = '[Object, Object]

class (GObject o, IsDescendantOf Keymap o) => IsKeymap o Source #

Type class for types which can be safely cast to Keymap, for instance with toKeymap.

Instances

Instances details
(GObject o, IsDescendantOf Keymap o) => IsKeymap o Source # 
Instance details

Defined in GI.IBus.Objects.Keymap

toKeymap :: (MonadIO m, IsKeymap o) => o -> m Keymap Source #

Cast to Keymap, for types for which this is known to be safe. For general casts, use castTo.

Methods

Overloaded methods

get

keymapGet Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: The keymap file to be loaded, such as 'us', 'jp'.

-> m Keymap

Returns: An Keymap associated with the giving name; or Nothing if failed.

Get an IBusKeymap associated with the giving name.

This function loads the keymap file specified in name in the IBUS_DATA_DIR/keymaps directory.

lookupKeysym

keymapLookupKeysym Source #

Arguments

:: (HasCallStack, MonadIO m, IsKeymap a) 
=> a

keymap: An IBusKeymap.

-> Word16

keycode: A scancode to be converted.

-> Word32

state: Modifier flags(such as Ctrl, Shift).

-> m Word32

Returns: Corresponding keysym.

Converts the scancode to keysym, given the keymap.

new

keymapNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: The keymap file to be loaded, such as 'us', 'jp'.

-> m Keymap

Returns: An Keymap associated with the giving name; or Nothing if failed.

Deprecated: This function has been deprecated and shouldnot be used in newly written code. Please use keymapGet.

Get an Keymap associated with the giving name.

This function loads the keymap file specified in name in the IBUS_DATA_DIR/keymaps directory.