Plugin:MirLua/Module/m hotkeys/de: Difference between revisions
Jump to navigation
Jump to search
Wishmaster (talk | contribs) (Created page with "$HotkeyItem-Tabelle") |
Wishmaster (talk | contribs) (Created page with "Gibt $true zurück wenn die Tastenkombination erfolgreich registriert wurde, sonst $false.") |
||
Line 28: | Line 28: | ||
{{nbsp|5}}{{Ls|MirLua/Modules/type}} <code>boolean</code> | {{nbsp|5}}{{Ls|MirLua/Modules/type}} <code>boolean</code> | ||
{{nbsp|5}} | {{nbsp|5}}Gibt <code>true</code> zurück wenn die Tastenkombination erfolgreich registriert wurde, sonst <code>false</code>. | ||
==== {{Ls|MirLua/Modules/example}} ==== | ==== {{Ls|MirLua/Modules/example}} ==== |
Revision as of 20:02, 2 June 2018
Allows you to work with key combinations.
Inkludieren Sie folgendes Modul: local hotkeys = require('m_hotkeys')
Funktionen
Register
Registers a key combination.
Parameter
Parametername | Benötigt | Typ | Beschreibung |
---|---|---|---|
data | Ja | table
|
HotkeyItem-Tabelle |
Ergebnis
Typ: boolean
Gibt true
zurück wenn die Tastenkombination erfolgreich registriert wurde, sonst false
.
Beispiel
local hIcon = hotkeys.Register({ Name = 'hkUniqueName' })
Unregister
Removes a key combination.
Parameter
Parametername | Benötigt | Typ | Beschreibung |
---|---|---|---|
name | Ja | string
|
Key combination name. |
Ergebnis
Typ: boolean
Returns true
if key combination was removed successfully, otherwise false
.
Beispiel
hotkeys.Unregister('hkUniqueName')
MakeHotkey
Creates key combination.
Parameter
Parametername | Benötigt | Typ | Beschreibung |
---|---|---|---|
modifier | Ja | number , string , table
|
Modifier key code or name or list of names. Takes values:
|
key | Ja | string
|
Normal (non-modifier) key. |
Ergebnis
Typ: number
Returns key combination.
Beispiel
local HOTKEYF_SHIFT = 0x01
local HOTKEYF_ALT = 0x04
local hk = hotkeys.MakeHotkey(HOTKEYF_SHIFT | HOTKEYF_ALT, 'A')
local hk = hotkeys.MakeHotkey('ctrl', 'A')
local hk = hotkeys.MakeHotkey({ 'ctrl', 'alt' }, 'A')
Structures
HotkeyItem
A table describing key combination parameters.
Felder
Feldname | Benötigt | Typ | Beschreibung |
---|---|---|---|
Name | Ja | string
|
Name of key combination (automatically translated by Core). |
Description | Nein | string
|
Description of key combination (automatically translated by Core). |
Section | Nein | string
|
Section name in Miranda hotkey settings. By default plugin name (MirLua) is used. |
Hotkey | Nein | number
|
Default key combination. |
Service | Nein | string
|
Service name. |
Flags | Nein | number
|
Additional flags. |