C# Class WinCompose.Composer

The main composer class. It gets input from the keyboard hook, and acts depending on the global configuration and current keyboard state.
Show file Open project: samhocevar/wincompose Class Usage Examples

Public Methods

Method Description
Fini ( ) : void

Terminate the composer.

Init ( ) : void

Initialize the composer.

IsComposing ( ) : bool

Indicates whether a compose sequence is in progress

IsDisabled ( ) : bool

Return whether WinCompose has been disabled

OnKey ( WM ev, VK vk, SC sc, LLKHF flags ) : bool

Get input from the keyboard hook; return true if the key was handled and needs to be removed from the input chain.

ToggleDisabled ( ) : void

Toggle the disabled state

UpdateKeyboardLeds ( object sender, EventArgs e ) : void

Private Methods

Method Description
AddToSequence ( Key key ) : bool

Add a key to the sequence currently being built. If necessary, output the finished sequence or trigger actions for invalid sequences.

AnalyzeKeyboardLayout ( ) : void

Attempt to enumerate all dead keys available on the current keyboard layout and cache the results in m_possible_dead_keys.

CheckKeyboardLayout ( ) : void
OnKeyInternal ( WM ev, VK vk, SC sc, LLKHF flags ) : bool
ResetSequence ( ) : void
RestoreDeadKey ( int dead_key ) : void

Restore a previously saved dead key. This should restore the ToUnicode internal buffer.

SaveDeadKey ( ) : int

Save the dead key if there is one, since we'll be calling ToUnicode later on. This effectively removes any dead key from the ToUnicode internal buffer.

SendKeyDown ( VK vk, KEYEVENTF flags ) : void
SendKeyPress ( VK vk, KEYEVENTF flags ) : void
SendKeyUp ( VK vk, KEYEVENTF flags ) : void
SendString ( string str ) : void
StartMonitoringKeyboardLeds ( ) : void
StopMonitoringKeyboardLeds ( ) : void
VkToKey ( VK vk, SC sc, LLKHF flags, bool has_shift, bool has_altgr, bool has_capslock ) : Key
VkToUnicode ( VK vk ) : string
VkToUnicode ( VK vk, SC sc, byte keystate, LLKHF flags ) : string

Method Details

Fini() public static method

Terminate the composer.
public static Fini ( ) : void
return void

Init() public static method

Initialize the composer.
public static Init ( ) : void
return void

IsComposing() public static method

Indicates whether a compose sequence is in progress
public static IsComposing ( ) : bool
return bool

IsDisabled() public static method

Return whether WinCompose has been disabled
public static IsDisabled ( ) : bool
return bool

OnKey() public static method

Get input from the keyboard hook; return true if the key was handled and needs to be removed from the input chain.
public static OnKey ( WM ev, VK vk, SC sc, LLKHF flags ) : bool
ev WM
vk VK
sc SC
flags LLKHF
return bool

ToggleDisabled() public static method

Toggle the disabled state
public static ToggleDisabled ( ) : void
return void

UpdateKeyboardLeds() public static method

public static UpdateKeyboardLeds ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void