Both sides previous revisionPrevious revision | |||
guide:event_binding [2017-03-21 07:03] – skyjake | guide:event_binding [2019-11-17 16:08] (current) – skyjake | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Event bindings ====== | ||
+ | |||
+ | |||
+ | Event bindings map input events to console commands. | ||
+ | |||
+ | |||
+ | ===== Syntax ===== | ||
+ | |||
+ | # | ||
+ | |||
+ | The event specification //spec// is composed of an event descriptor and optionally any additional conditions for the validity of the binding. The specification may be prefixed with a context name; if omitted, the binding is created in the default " | ||
+ | |||
+ | |||
+ | ===== Examples ===== | ||
+ | |||
+ | < | ||
+ | bindevent key-codex20-up "print {space (0x20) released}" | ||
+ | bindevent key-m-down+key-shift+key-ctrl "print {Shift+Ctrl+M}" | ||
+ | bindevent key-capslock-down " | ||
+ | bindevent key-home-down " | ||
+ | bindevent key-equals-down {add view-size 1} | ||
+ | bindevent key-equals-repeat {add view-size 1} | ||
+ | bindevent key-t+multiplayer beginchat | ||
+ | bindevent game: | ||
+ | bindevent chat:key-f2 {chatsendmacro 1} | ||
+ | bindevent map:key-c {impulse clearmarks} | ||
+ | bindevent shortcut: | ||
+ | </ | ||
+ | < | ||
+ | bindevent mouse-left "print {left mouse button pressed}" | ||
+ | bindevent mouse-right-up "print {right mouse button released}" | ||
+ | </ | ||
+ | < | ||
+ | bindevent " | ||
+ | bindevent joy-x-within0.1 "print {joy X centered}" | ||
+ | bindevent joy-x-pos1.0 "print {joy X positive}" | ||
+ | bindevent joy-hat-angle3 "print {angle 3}" | ||
+ | bindevent joy-hat-center "print center" | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== See also ===== | ||
+ | |||
+ | * [[Bindings]] | ||
+ | * Console command '' | ||
+ | |||
+ | |||