Fcitx
Public Member Functions | Protected Attributes | List of all members
fcitx::KeyEventBase Class Reference
Inheritance diagram for fcitx::KeyEventBase:
Inheritance graph
[legend]
Collaboration diagram for fcitx::KeyEventBase:
Collaboration graph
[legend]

Public Member Functions

 KeyEventBase (EventType type, InputContext *context, Key rawKey, bool isRelease=false, int time=0)
 
 KeyEventBase (const KeyEventBase &)=default
 
Key key () const
 Normalized key event. More...
 
void setKey (const Key &key)
 It will automatically be called if input method layout does not match the system keyboard layout. More...
 
void setRawKey (const Key &key)
 It is designed for faking the key event. More...
 
void setForward (bool forward)
 It is designed for overriding the key forward option. More...
 
Key origKey () const
 Key event regardless of keyboard layout conversion. More...
 
Key rawKey () const
 Key event after layout conversion. More...
 
bool isRelease () const
 
int time () const
 
bool forward () const
 If true, the key that produce character will commit a string. More...
 
- Public Member Functions inherited from fcitx::InputContextEvent
 InputContextEvent (InputContext *context, EventType type)
 
InputContextinputContext () const
 
- Public Member Functions inherited from fcitx::Event
 Event (EventType type)
 
EventType type () const
 Type of event, can be used to decide event class. More...
 
void accept ()
 
bool accepted () const
 Return value used by Instance::postEvent. More...
 
virtual bool filtered () const
 Whether a event is filtered by handler. More...
 
bool isInputContextEvent () const
 A helper function to check if a event is input context event. More...
 

Protected Attributes

Key key_
 
Key origKey_
 
Key rawKey_
 
bool isRelease_
 
int time_
 
bool forward_ = false
 
- Protected Attributes inherited from fcitx::InputContextEvent
InputContextic_
 
- Protected Attributes inherited from fcitx::Event
EventType type_
 
bool accepted_ = false
 

Detailed Description

Definition at line 233 of file event.h.

Member Function Documentation

◆ forward()

bool fcitx::KeyEventBase::forward ( ) const
inline

If true, the key that produce character will commit a string.

This is currently used by internal keyboard layout translation.

Returns
bool

Definition at line 303 of file event.h.

◆ key()

Key fcitx::KeyEventBase::key ( ) const
inline

Normalized key event.

Returns
fcitx::Key

Definition at line 244 of file event.h.

◆ origKey()

Key fcitx::KeyEventBase::origKey ( ) const
inline

Key event regardless of keyboard layout conversion.

Returns
fcitx::Key

Definition at line 283 of file event.h.

◆ rawKey()

Key fcitx::KeyEventBase::rawKey ( ) const
inline

Key event after layout conversion.

Basically it is the "unnormalized" key event.

Returns
fcitx::Key

Definition at line 292 of file event.h.

◆ setForward()

void fcitx::KeyEventBase::setForward ( bool  forward)
inline

It is designed for overriding the key forward option.

Normally should not be used.

Parameters
forward
Since
5.0.4

Definition at line 276 of file event.h.

◆ setKey()

void fcitx::KeyEventBase::setKey ( const Key key)
inline

It will automatically be called if input method layout does not match the system keyboard layout.

Parameters
keyp_key:...

Definition at line 252 of file event.h.

◆ setRawKey()

void fcitx::KeyEventBase::setRawKey ( const Key key)
inline

It is designed for faking the key event.

Normally should not be used.

Parameters
keykey event to override.
Since
5.0.4

Definition at line 263 of file event.h.


The documentation for this class was generated from the following files: