Skip to content

Commit 3debf71

Browse files
committed
CHANGED: bindings format
Preparing for automated binding reference generation
1 parent 18d1c35 commit 3debf71

File tree

7 files changed

+912
-266
lines changed

7 files changed

+912
-266
lines changed

documentation/mdbook_asciio/src/Bindings_reference.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

documentation/mdbook_asciio/src/Interface.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,3 @@ Although work can mostly be done using the keyboard, the mouse is still useful a
1515
## popup menus
1616

1717
My least favorite way of using Asciio, it's slow and cumbersome for most actions. I try to limit the amount of menu and sub menus.
18-
19-

documentation/mdbook_asciio/src/config/binding_format.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ These files are valid Perl scripts, you can defined code to bind to in the files
88

99
Use the following commands to define commands:
1010

11-
| Subroutine Name | Purpose | Data Format Expected |
12-
| --- | --- | --- |
13-
| register_action_handlers | Defines actions, and multi-level action groups. | |
14-
| register_action_handlers_with_override | As above but also **deletes** old shortcuts | list of key-value pairs |
15-
| TOP_LEVEL_GROUP | Defines the content of the top-level grouping used for menu display | shortcut and a list of action |
16-
| GROUP | Used to declare a nested, ordered, action group. | |
17-
| USE_GROUP | binds a shortcut with a group | |
18-
| CONTEXT_MENU | Defines actions that are only accessible via a context menu | |
19-
| MACRO | associate a action to set of commands | |
11+
| Subroutine Name | Purpose | Data Format Expected |
12+
| --- | --- | --- |
13+
| register_action_handlers | Defines actions, and multi-level action groups. | |
14+
| register_action_handlers_with_override | As above but also **deletes** old shortcuts | list of key-value pairs |
15+
| PROXY_GROUP | Defines the content of the top-level grouping used for menu display | shortcut and a list of action |
16+
| ROOT_GROUP | Defines actions that are registered in the default group | information and a list of actions |
17+
| GROUP | Used to declare a nested, ordered, action group. | |
18+
| USE_GROUP | binds a shortcut with a group | |
19+
| CONTEXT_MENU | Defines actions that are only accessible via a context menu | |
20+
| MACRO | associate a action to set of commands | |
2021

2122
## Action Definition Formats
2223

lib/App/Asciio/Actions.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ my ($self, $keep_visible) = @_ ;
2929

3030
if($self->{USE_BINDINGS_COMPLETION} && ! $self->{CURRENT_ACTIONS}{HIDE})
3131
{
32-
my %reserved = map { $_ => 1 } qw(HIDE IS_GROUP ENTER_GROUP ESCAPE_KEYS ESCAPE_GROUP NAME SHORTCUTS ORIGIN CODE OPTIONS) ;
32+
my %reserved = map { $_ => 1 } qw(HIDE IS_GROUP DESCRIPTION ENTER_GROUP ESCAPE_KEYS ESCAPE_GROUP NAME SHORTCUTS ORIGIN CODE OPTIONS) ;
3333

3434
my $binding_max_length =
3535
max map { length }
@@ -68,6 +68,7 @@ if($self->{USE_BINDINGS_COMPLETION} && ! $self->{CURRENT_ACTIONS}{HIDE})
6868
} @actions
6969
] ;
7070

71+
7172
$self->{BINDINGS_COMPLETION_LENGTH} = $max_length ;
7273
$self->update_display() ;
7374
}

0 commit comments

Comments
 (0)