Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::KeyEvent Struct Reference

A key has been pressed. More...

#include <canvas-event.h>

Inheritance diagram for Inkscape::KeyEvent:
Inkscape::CanvasEvent Inkscape::KeyPressEvent Inkscape::KeyReleaseEvent

Public Member Functions

unsigned modifiersChange () const override
 Get the change in the modifiers due to this event.
 
- Public Member Functions inherited from Inkscape::CanvasEvent
virtual ~CanvasEvent ()
 
virtual EventType type () const =0
 Return the dynamic type of the CanvasEvent.
 
unsigned modifiersAfter () const
 Get the modifiers mask immediately after the event. (Convenience function.)
 

Public Attributes

uint32_t keyval = 0
 The key that was pressed/released. (Matches gdkkeysyms.h.)
 
uint16_t keycode = 0
 The raw code of the key that was pressed/released.
 
int group = 0
 The keyboard group.
 
uint32_t time = 0
 Timestamp of the event in milliseconds.
 
std::optional< Geom::Pointpos
 Location of the cursor, in world coordinates.
 
std::optional< Geom::Pointorig_pos
 Location of the cursor, in GDK event / canvas widget coordinates.
 
- Public Attributes inherited from Inkscape::CanvasEvent
unsigned modifiers = 0
 The modifiers mask immediately before the event.
 
std::shared_ptr< Gdk::Device const > device
 The device that sourced the event. May be null.
 

Detailed Description

A key has been pressed.

Definition at line 141 of file canvas-event.h.

Member Function Documentation

◆ modifiersChange()

unsigned Inkscape::KeyEvent::modifiersChange ( ) const
inlineoverridevirtual

Get the change in the modifiers due to this event.

Reimplemented from Inkscape::CanvasEvent.

Definition at line 143 of file canvas-event.h.

References keyval.

Member Data Documentation

◆ group

int Inkscape::KeyEvent::group = 0

The keyboard group.

Definition at line 170 of file canvas-event.h.

Referenced by Inkscape::Shortcuts::get_from_event(), and Inkscape::UI::Tools::get_latin_keyval().

◆ keycode

uint16_t Inkscape::KeyEvent::keycode = 0

The raw code of the key that was pressed/released.

Definition at line 167 of file canvas-event.h.

Referenced by Inkscape::Shortcuts::get_from_event(), and Inkscape::UI::Tools::get_latin_keyval().

◆ keyval

uint32_t Inkscape::KeyEvent::keyval = 0

◆ orig_pos

std::optional<Geom::Point> Inkscape::KeyEvent::orig_pos

Location of the cursor, in GDK event / canvas widget coordinates.

Definition at line 179 of file canvas-event.h.

◆ pos

std::optional<Geom::Point> Inkscape::KeyEvent::pos

Location of the cursor, in world coordinates.

Definition at line 176 of file canvas-event.h.

◆ time

uint32_t Inkscape::KeyEvent::time = 0

Timestamp of the event in milliseconds.

Definition at line 173 of file canvas-event.h.


The documentation for this struct was generated from the following file: