mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-08 02:49:56 +00:00
35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
caption: keyboard
|
|
created: 20140302192136805
|
|
modified: 20151224141005939
|
|
tags: Widgets
|
|
title: KeyboardWidget
|
|
type: text/vnd.tiddlywiki
|
|
|
|
! Introduction
|
|
|
|
The keyboard widget allows ActionWidgets to be triggered by specific key combinations. There is also a shorthand for generating [[Messages]].
|
|
|
|
! Content and Attributes
|
|
|
|
The content of the `<$keyboard>` widget is rendered normally. The keyboard shortcut only takes effect within the contained content.
|
|
|
|
|!Attribute |!Description |
|
|
|message |The title of the [[WidgetMessage|Messages]] to generate |
|
|
|param |The parameter to be passed with the [[WidgetMessage|Messages]] |
|
|
|key |Key string identifying the key to be trapped (see below) |
|
|
|class |A CSS class to be assigned to the generated HTML DIV element |
|
|
|
|
! Key Strings
|
|
|
|
Key strings are made up of zero or more of the modifiers <kbd>alt</kbd>, <kbd>shift</kbd> or <kbd>ctrl</kbd> followed by the name of a key, all joined with "+" plus symbols. Key names are either the letter or digit printed on the key (eg "a" or "1"), or one of the special keys <kbd>backspace</kbd>, <kbd>tab</kbd>, <kbd>enter</kbd> or <kbd>escape</kbd>.
|
|
|
|
For example:
|
|
|
|
```
|
|
A
|
|
shift+A
|
|
shift+escape
|
|
ctrl+enter
|
|
ctrl+shift+alt+A
|
|
```
|