Plugin:MirLua/Module/m hotkeys/de: Difference between revisions

From Miranda NG
Jump to navigation Jump to search
(Created page with "Eine Struktur, welche die Parameter der Tastenkombination enthält.")
(Created page with "Zusätzliche Flags.")
Line 151: Line 151:
| style="text-align:center" | {{Ls|YesNo/no}}
| style="text-align:center" | {{Ls|YesNo/no}}
| style="text-align:center" | <code>number</code>
| style="text-align:center" | <code>number</code>
| Additional flags.
| Zusätzliche Flags.
|}
|}

Revision as of 20:11, 2 June 2018

Other languages:

Erlaubt es Ihnen, mit Tastenkombinationen zu arbeiten.

Inkludieren Sie folgendes Modul: local hotkeys = require('m_hotkeys')

Funktionen

Register

Registriert eine Tastenkombination.

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

Entfernt eine Tastenkombination.

Parameter

Parametername Benötigt Typ Beschreibung
name Ja string Name der Tastenkombination.

Ergebnis

     Typ: boolean

     Gibt true zurück wenn die Tastenkombination erfolgreich entfernt wurde, sonst false.

Beispiel

hotkeys.Unregister('hkUniqueName')

MakeHotkey

Erzeugt eine Tastenkombination.

Parameter

Parametername Benötigt Typ Beschreibung
modifier Ja number, string, table Modifier key code or name or list of names. Takes values:
  • shift = 0x01
  • control = 0x02
  • alt = 0x04
  • win = 0x08
key Ja string Normal (non-modifier) key.

Ergebnis

     Typ: number

     Gibt die Tastenkombination zurück.

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')

Strukturen

HotkeyItem

Eine Struktur, welche die Parameter der Tastenkombination enthält.

Felder

Feldname Benötigt Typ Beschreibung
Name Ja string Name der Tastenkombination (wird automatisch übersetzt).
Description Nein string Beschreibung der Tastenkombination (wird automatisch übersetzt).
Section Nein string Name der Gruppe in den Miranda-Tastenkombinations-Einstellungen. Standardmäßig wird der Name des Plugins (MirLua) verwendet.
Hotkey Nein number Standard Tastenkombination.
Service Nein string Dienstname.
Flags Nein number Zusätzliche Flags.