1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-18 14:10:28 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/widgets/KeyboardWidget.tid

35 lines
1.2 KiB
Plaintext
Raw Normal View History

2015-05-14 09:16:29 +00:00
caption: keyboard
2014-03-02 19:30:13 +00:00
created: 20140302192136805
2015-12-24 14:12:50 +00:00
modified: 20151224141005939
2014-09-10 23:06:19 +00:00
tags: Widgets
2014-03-02 19:30:13 +00:00
title: KeyboardWidget
type: text/vnd.tiddlywiki
! Introduction
2015-12-24 14:12:50 +00:00
The keyboard widget allows ActionWidgets to be triggered by specific key combinations. There is also a shorthand for generating [[Messages]].
2014-03-02 19:30:13 +00:00
! Content and Attributes
The content of the `<$keyboard>` widget is rendered normally. The keyboard shortcut only takes effect within the contained content.
|!Attribute |!Description |
2014-10-10 20:06:48 +00:00
|message |The title of the [[WidgetMessage|Messages]] to generate |
|param |The parameter to be passed with the [[WidgetMessage|Messages]] |
2014-03-02 19:30:13 +00:00
|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
2015-05-14 09:16:29 +00:00
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>.
2014-03-02 19:30:13 +00:00
For example:
```
A
shift+A
shift+escape
ctrl+enter
ctrl+shift+alt+A
```