ButtonMap¶
-
class ButtonMap¶
Bases:
TypedReferenceCountThis class represents a map containing all of the buttons of a (keyboard) device, though it can also be used as a generic mapping between
ButtonHandles. It maps an underlying ‘raw’ button to a ‘virtual’ button, which may optionally be associated with an appropriate platform-specific name for the button.Inheritance diagram
digraph inheritance78ddb50d3e { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "ButtonMap" [URL="acron.core.ButtonMap.html#acron.core.ButtonMap",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedReferenceCount" -> "ButtonMap" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedReferenceCount" [URL="acron.core.TypedReferenceCount.html#acron.core.TypedReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; }- ButtonMap.__init__()¶
- static ButtonMap.get_class_type()¶
- ButtonMap.get_mapped_button()¶
Returns the nth mapped button, meaning the button that the nth raw button is mapped to.
Returns the button that the given button is mapped to, or
ButtonHandle::none()if this map does not specify a mapped button for the given raw button.Returns the button that the given button is mapped to, or
ButtonHandle::none()if this map does not specify a mapped button for the given raw button.
- ButtonMap.get_mapped_button_label()¶
Returns the label associated with the nth mapped button, meaning the button that the nth raw button is mapped to.
If the button map specifies a special name for the button (eg. if the operating system or keyboard device has a localized name describing the key), returns it, or the empty string otherwise.
Note that this is not the same as get_mapped_button().get_name(), which returns the name of the Acron event associated with the button.
If the button map specifies a special name for the button (eg. if the operating system or keyboard device has a localized name describing the key), returns it, or the empty string otherwise.
Note that this is not the same as get_mapped_button().get_name(), which returns the name of the Acron event associated with the button.
- ButtonMap.get_num_buttons()¶
Returns the number of buttons that this button mapping specifies.
- ButtonMap.get_raw_button()¶
Returns the underlying raw button associated with the nth button.
- ButtonMap.output()¶
- ButtonMap.write()¶