diff --git a/Todo.txt b/Todo.txt index b67ad66c..ca6ce2c2 100644 --- a/Todo.txt +++ b/Todo.txt @@ -1,6 +1,9 @@ -run script from asciio - insert boxes, ... +bindings overlay + on off + for top level + except movements + with movements constraints alignement diff --git a/documentation/mdbook_asciio/src/Bindings.md b/documentation/mdbook_asciio/src/Bindings.md index 9ae46996..dfae86ec 100644 --- a/documentation/mdbook_asciio/src/Bindings.md +++ b/documentation/mdbook_asciio/src/Bindings.md @@ -9,5 +9,21 @@ accessed with shortcuts that start with the same letter. The bindings can be changed in your user configuration, See configuration/user_bindings +# Bindings help + +***Binding:*** zb + +![bindings_help](bindings_help.gif) + +You can get a pop up showing the bindings (*?* in the top level) Or you can configure it: + +``` +USE_BINDINGS_COMPLETION => 1, +``` + +## Bindings map + +*bindings change truth is in the config not this snapshot* + ![bindings](asciio_bindings.png) diff --git a/documentation/mdbook_asciio/src/bindings_help.gif b/documentation/mdbook_asciio/src/bindings_help.gif new file mode 100644 index 00000000..2d1c4ed9 Binary files /dev/null and b/documentation/mdbook_asciio/src/bindings_help.gif differ diff --git a/group_bindings.md b/group_bindings.md new file mode 100644 index 00000000..c2c9e244 --- /dev/null +++ b/group_bindings.md @@ -0,0 +1,378 @@ +Help +Add help box +Display keyboard mapping +Display commands +Display action files +Display man page +Open +Save +SaveAs +Insert +Quit +Quit no save + + +Add box +Add shrink box +Add text +Add arrow +Add angled arrow +Add connector +Add connector type2 +Add if +Add process +Add rhombus +Add ellipse +Add ascii line +Add ascii no-connectline +Add multiple texts +Add multiple boxes +use group unicode +use group box +use group ruler + + + +commands +Insert +align +arrow +movearrowends +clone +grouping +display +git +slides +stripes +debug +Clipboard +Insertfromclipboard +elementaction +Delete + + +| commands | 00S-colon | | | + +| Insert | 000-i | | | +| | use groupe type | **000-t | | +| | use groupe line | **000-l | | +| | use group unicode | 000-u | | +| | | **use group unicode line | 000-l | +| | use group box | 000-u | | +| | use group ruler | 000-r | | + +| align | 00S-A | | | +| arrow | 000-a | | | +| move arrow ends | 0A0-a | | | +| clone | 000-c | | | +| grouping | 000-g | | | +| display | 000-z | | | +| git | 00S-G | | | + +| slides | 00S-S | | | +| stripes | 0A0-g | | | +| debug | 00S-D | | | + +| **Clipboard | 000-y | | | +| **Insert from clipboard | 000-p, | | | + +| **element action | 000-e | | | +| **Delete | 000-d | | | + + +| leader | | | | +| ------------------------ | --------- | --- | - | +| commands | 00S-colon | | | +| | Help | 000-h | | +| | Add help box | 00S-H | | +| | Display keyboard mapping | 000-k | | +| | Display commands | 000-c | | +| | Display action files | 000-f | | +| | Display manpage | 000-m | | +| | Open | 000-e | | +| | Save | 000-w | | +| | SaveAs | 00S-W | | +| | Insert | 000-r | | +| | Quit | 000-q | | +| | Quit no save | 00S-Q | | + +| Insert | 000-i | | | +| | Add box | 000-b | | +| | Add shrink box | 00S-B | | +| | Add text | 000-t | | +| | Add arrow | 000-a | | +| | Add angled arrow | 00S-A | | +| | Add connector | 000-c | | +| | Add connector type 2 | 00S-C | | +| | Add if | 000-i | iti | +| | Add process | 000-p | itp | +| | Add rhombus | 0A0-r | itr | +| | Add ellipse | 000-e | ite | +| | **** Add triangle | **** | itt | +| | Add ascii line | 000-l | ill | +| | Add ascii no-connect line | 000-k | iln | +| | Add multiple texts | C00-t | imt | +| | Add multiple boxes | C00-b | imb | + +| | use group unicode | 000-u | | +| | | Add unicode box | 000-b | +| | | Add unicode arrow | 000-a | +| | | Add unicode angled arrow | 00S-A | + +| | ? sub group in unicode | Add unicode line | 000-l | +| | | Add unicode bold line | 00S-L | +| | | Add unicode double line | 0A0-l | +| | | Add unicode no-connect line | 000-k | +| | | Add unicode no-connect bold line | 00S-K | +| | | Add unicode no-connect double line | 0A0-K | + +| | use group box | 000-u | | +| | | Add exec box | C00-e | +| | | Add exec box verbatim | C00-v | +| | | Add exec box verbatim once | C00-o | +| | | Add line numbered box | C00-l | + +| | use group ruler | 000-r | | +| | | Add vertical ruler | 000-v | +| | | Add horizontal ruler | 000-h | +| | | delete rulers | 000-d | + +| align | 00S-A | | | +| | Align top | 000-ta | | +| | Align left | 000-la | | +| | Align bottom | 000-ba | | +| | Align right | 000-ra | | +| | Align vertically | 000-va | | +| | Align horizontally | 000-ha | | + +| arrow | 000-a | | | +| | Change arrow direction | 000-d | | +| | Flip arrow start and end | 000-f | | +| | Append multi_wirl section | 000-s | | +| | Insert multi_wirl section | 00S-S | | +| | Prepend multi_wirl section | 0A0-s | | +| | Remove last section from multi_wirl | C00-s | | +| | start no disconnect | C00-d | | +| | end no disconnect | C0S-D | | + +| display | 000-z | | | +| | Change elements foreground color | 000-c | | +| | Change elements background color | 00S-C | | +| | Change Asciio background color | 0A0-c | | +| | Change grid color | 0AS-C | | +| | Flip color scheme | 000-s | | +| | Flip transparent element background | 000-t | | +| | Flip grid display | 000-g | | +| | Flip hint lines | 000-h | | +| | Change font | 000-f | | +| | Edit inline | 000-i | | +| | show/hide connectors | 000-v | | +| | flip cross mode | 000-x | * zx | +| | Zoom in | 000-plus, C00-j, C00-scroll-up | * z+ | +| | Zoom out | 000-minus, C00-h, C00-scroll-down | * z- | + +| clone | 000-c | | | +| | clone escape | 000-Escape, | | +| | clone motion | 000-motion_notify | | +| | clone insert | 000-button-press-1 | | +| | clone insert2 | 000-Return, | | +| | clone arrow | 000-a, | | +| | clone angled arrow | 00S-A, | | +| | clone box | 000-b, | | +| | clone text | 000-t, | | +| | clone flip hint lines | 000-h, | | +| | //clone left | 00-Left, | | +| | //clone right | 00-Right, | | +| | //clone up | 00-Up, | | +| | //clone down | 00-Down, | | +| | //clone emulation left | 00-Left, | | +| | //clone emulation right | 00-Right, | | +| | //clone emulation up | 00-Up, | | +| | //clone emulation down | 00-Down, | | + +| debug | 00S-D | | | +| | Display undo stack statistics | 000-u | | +| | Dump self | 000-s | | +| | Dump all elements | 000-e | | +| | Dump selected elements | 000-E | | +| | Display numbered objects | 000-t | | +| | Test | 000-o | | +| | ZBuffer Test | 000-z | | + +| git | 00S-G | | | +| | Quick git | 000-button-press-3, 000-g], | | +| | Git add box | 000-b, | | +| | Git add text | 000-t, | | +| | Git add arrow | 000-a, | | +| | Git edit selected element | 000-2button-press-1, 000-Return | | +| | Git mouse left-click | 000-button-press-1, | | +| | Git change arrow direction | 000-d, | | +| | Git undo | 000-u, | | +| | Git delete elements | 000-Delete, 000-x], | | +| | Git mouse motion | 000-motion_notify, | | +| | Git move elements left | 000-Left, | | +| | Git move elements right | 000-Right, | | +| | Git move elements up | 000-Up, | | +| | Git move elements down | 000-Down, | | +| | Git mouse right-click | 0A0-button-press-3, | | +| | Git flip hint lines | 000-h, | | + +| grouping | 000-g | | | +| | Group selected elements | 000-g | | +| | Ungroup selected elements | 000-u | | +| | Move selected elements to the front | 000-f | | +| | Move selected elements to the back | 000-b | | +| | Temporary move to the front | 00S-F | | + +| move arrow ends | 0A0-a | | | +| | arrow start up | 000-Up, | | +| | arrow start down | 000-Down, | | +| | arrow start right | 000-Right | | +| | arrow start left | 000-Left, | | +| | arrow start up2 | 000-k, | | +| | arrow start down2 | 000-j, | | +| | arrow start right2 | 000-l, | | +| | arrow start left2 | 000-h, | | +| | arrow end up | 00S-Up, | | +| | arrow end down | 00S-Down, | | +| | arrow end right | 00S-Right | | +| | arrow end left | 00S-Left, | | +| | arrow end up2 | 00S-K, | | +| | arrow end down2 | 00S-J, | | +| | arrow end right2 | 00S-L, | | +| | arrow end left2 | 00S-H, | | + +| slides | 00S-S | | | +| | Load slides | 000-l | | +| | previous slide | 00S-N | | +| | next slide | 000-n | | +| | first slide | 000-g | | +| | show previous message | 000-m | | +| | show next message | 00S-M | | + +| stripes | 0A0-g | | | +| | create stripes group | 000-g | | +| | create one stripe group | 000-1 | | +| | ungroup stripes group | 000-u | | + +| -------------------------------- | --------------------------------- | -------------- | | +| clipboard | | | | +| --------------------------------------- | --------------------------------- | -------------- | | +| Copy to clipboard | C00-c, C00-Insert, y | yy | | +| Export to clipboard & primary as ascii | C00-e, 00S-Y, Y], | ya | | +| Export to clipboard & primary as markup | C0S-E, | ym | | +| Insert from clipboard | C00-v, 00S-Insert, p | pp | | +| Import from primary to box | C0S-V, 00S-P, P | ?? | | +| Import from primary to text | 0A0-p,A-P], | pcp | | +| Import from clipboard to box | 0AS-E , | | | +| Import from clipboard to text | 0AS-T , | | | + +| -------------------------------- | --------------------------------- | -------------- | | +| selection | | | | +| -------------------------------- | --------------------------------- | -------------- | | +| Deselect all elements | 000-Escape, | | | +| Select next element | 000-Tab, 000-n, | | | +| Select previous element | 00S-ISO_Left_Tab, 00S-N | | | +| Select next non arrow | C00-Tab, C00-n, | | | +| Select previous non arrow | C0S-ISO_Left_Tab, C0S-N | | | +| Select next arrow | CA0-Tab, C00-m, | | | +| Select previous arrow | CAS-ISO_Left_Tab, C0S-M | | | +| Select element by id | 0A0-Tab, | | | +| Select all elements | C00-a, 00S-V | | | +| Select connected elements | 000-v, | | | +| Select elements by word | C00-f, | | | +| Select elements by word no group | C0S-F, | | | + +| -------------------------------- | --------------------------------- | -------------- | | +| movement | | | | +| ---------------------------------- | --------------------------------- | -------------- | | +| Move selected elements left | 000-Left, | | | +| Move selected elements right | 000-Right, | | | +| Move selected elements up | 000-Up, | | | +| Move selected elements down | 000-Down, | | | +| | | | | +| Move selected elements left quick | 0A0-Left, | | | +| Move selected elements right quick | 0A0-Right, | | | +| Move selected elements up quick | 0A0-Up, | | | +| Move selected elements down quick | 0A0-Down, | | | +| | | | | +| Move selected elements left 2 | 000-h, h | | | +| Move selected elements right 2 | 000-l, l | | | +| Move selected elements up 2 | 000-k, k | | | +| Move selected elements down 2 | 000-j, j | | | + +| ---------------------------- | --------------------------------- | -------------- | | +| element modification | | | | +| ---------------------------- | --------------------------------- | -------------- | | +| Shrink box | 000-s | es | | +| | | | | +| Make element narrower | 000-1 | en | | +| Make element taller | 000-2 | et | | +| Make element shorter | 000-3 | es | | +| Make element wider | 000-4 | ew | | +| | | | | +| Make elements Unicode | C00-u | eu | | +| Make elements not Unicode | C0S-U | eU | | +| | | | | +| Delete selected elements | 000-Delete 000-d] | dd | | +| | | | | +| Edit selected element | 000-2button-press-1, 000-Return | ee | | +| Edit selected element inline | C00-2button-press-1, C00-Return | eE | | + +| -------------------------------- | --------------------------------- | -------------- | | +| mouse | | | | +| --------------------------- | --------------------------------- | -------------- | | +| Mouse right-click | 000-button-press-3 | | | +| | | | | +| Mouse left-click | 000-button-press-1 | | | +| Mouse expand selection | 00S-button-press-1 | | | +| Mouse selection flip | C00-button-press-1 | | | +| | | | | +| Mouse quick link | [0A0-button-press-1, 000-period | | | +| Mouse duplicate elements | 0AS-button-press-1, 000-comma | | | +| Mouse quick box | C0S-button-press-1 | | | +| | | | | +| Arrow to mouse | CA0-motion_notify | | | +| Arrow mouse change directio | CA0-2button-press-1 | | | +| Arrow change direction | CA0-d | | | +| Wirl arrow add section | CA0-button-press-1 | | | +| Wirl arrow insert flex poin | CA0-button-press-2 | | | +| | | | | +| Mouse motion | 000-motion_notify | | | +| Mouse motion 2 | 0AS-motion_notify | | | +| Mouse drag canvas | C00-motion_notify | | | +| Mouse on element id | 000-m | | | + +| -------------------------------- | --------------------------------- | -------------- | | +| mouse emulation | | | | +| -------------------------------- | --------------------------------- | -------------- | | +| Mouse emulation toggle | 000-apostrophe | | | +| | | | | +| Mouse emulation left-click | 000-odiaeresis | | | +| Mouse emulation expand selection | 00S-Odiaeresis | | | +| Mouse emulation selection flip | C00-odiaeresis | | | +| | | | | +| Mouse emulation right-click | 000-adiaeresis | | | +| | | | | +| Mouse emulation move left | C00-Left | | | +| Mouse emulation move right | C00-Right | | | +| Mouse emulation move up | C00-Up | | | +| Mouse emulation move down | C00-Down | | | +| | | | | +| Mouse emulation drag left | 00S-Left | | | +| Mouse emulation drag right | 00S-Right | | | +| Mouse emulation drag up | 00S-Up | | | +| Mouse emulation drag down | 00S-Down | | - | + + +| context menues | +| ------------------------- | +| Asciio context_menu | +| Box context_menu | +| Multi_wirl context_menu | +| Angled arrow context_menu | +| Ruler context_menu | +| Shapes context_menu | +| Undo | +| Redo | + diff --git a/lib/App/Asciio.pm b/lib/App/Asciio.pm index 875df319..d4b0ea81 100644 --- a/lib/App/Asciio.pm +++ b/lib/App/Asciio.pm @@ -800,6 +800,9 @@ my $modifiers = $event->{MODIFIERS} ; if($self->{PREVIOUS_X} != $x || $self->{PREVIOUS_Y} != $y) { + delete $self->{BINDINGS_COMPLETION} ; + $self->update_display ; + if($self->exists_action("${modifiers}motion_notify")) { $self->run_actions(["${modifiers}motion_notify", $event]) ; diff --git a/lib/App/Asciio/Actions.pm b/lib/App/Asciio/Actions.pm index 18438ee6..713f4270 100644 --- a/lib/App/Asciio/Actions.pm +++ b/lib/App/Asciio/Actions.pm @@ -1,6 +1,10 @@ package App::Asciio ; + +use strict ; use warnings ; + use Encode ; +use List::Util qw(max) ; #------------------------------------------------------------------------------------------------------ @@ -17,6 +21,65 @@ $self->run_actions($action) ; $self->{CROSS_ACTION_GROUP}++ ; } +sub create_binding_completions +{ +my ($self, $keep_visible) = @_ ; + +if($self->{USE_BINDINGS_COMPLETION}) + { + my $binding_max_length = + max map { length } + grep { + $_ ne 'IS_GROUP' + && $_ ne 'ENTER_GROUP' + && $_ ne 'ESCAPE_KEY' + && $_ ne 'NAME' + && $_ ne 'SHORTCUTS' + && $_ ne 'ORIGIN' + && $_ ne 'CODE' + } + keys $self->{CURRENT_ACTIONS}->%* ; + + my $max_length = 0 ; + + $self->{BINDINGS_COMPLETION} = + [ + map + { + my $completion = sprintf("%-${binding_max_length}s - %s", $_, $self->{CURRENT_ACTIONS}{$_}{NAME}) ; + my $length = length $completion ; + + $max_length = $length if $length > $max_length ; + $completion ; + } + sort grep { + $_ ne 'IS_GROUP' + && $_ ne 'ENTER_GROUP' + && $_ ne 'ESCAPE_KEY' + && $_ ne 'NAME' + && $_ ne 'SHORTCUTS' + && $_ ne 'ORIGIN' + && $_ ne 'CODE' + } + keys $self->{CURRENT_ACTIONS}->%* + ] ; + + $self->{BINDINGS_COMPLETION_LENGTH} = $max_length ; + + $self->update_display() ; + } +else + { + if(exists $self->{BINDINGS_COMPLETION}) + { + delete $self->{BINDINGS_COMPLETION} ; + $self->update_display() ; + } + } + +$_[0]->{KEEP_BINDINGS_COMPLETION}++ if $keep_visible ; +} + #------------------------------------------------------------------------------------------------------ sub run_actions @@ -92,9 +155,26 @@ for my $action (@actions) ] ; } - $self->{CURRENT_ACTIONS} = $self->{ACTIONS} unless $is_group || $in_capture || $self->{CROSS_ACTION_GROUP} ; + $is_group += $self->{CROSS_ACTION_GROUP} // 0 ; delete $self->{CROSS_ACTION_GROUP} ; + $self->{CURRENT_ACTIONS} = $self->{ACTIONS} unless $is_group || $in_capture ; + + if ($is_group) + { + $self->create_binding_completions() ; + } + else + { + unless ($self->{KEEP_BINDINGS_COMPLETION}) + { + delete $self->{BINDINGS_COMPLETION} ; + $self->update_display() ; + } + + delete $self->{KEEP_BINDINGS_COMPLETION} ; + } + if($is_group && defined $self->{CURRENT_ACTIONS}{ENTER_GROUP}) { $self->{CURRENT_ACTIONS}{ENTER_GROUP}->($self) ; @@ -131,9 +211,11 @@ for my $action (@actions) { $self->{ACTION_VERBOSE}->(sprintf "\e[31m%-30s\e[m", "$action") if $self->{ACTION_VERBOSE} ; $self->{CURRENT_ACTIONS} = $self->{ACTIONS} ; + } $self->update_display() ; + delete $self->{BINDINGS_COMPLETION} ; } } diff --git a/lib/App/Asciio/GTK/Asciio.pm b/lib/App/Asciio/GTK/Asciio.pm index 8822ae31..3a94134a 100644 --- a/lib/App/Asciio/GTK/Asciio.pm +++ b/lib/App/Asciio/GTK/Asciio.pm @@ -12,7 +12,7 @@ use Glib ':constants'; use Gtk3 -init; use Pango ; -use List::MoreUtils qw(all) ; +use List::Util qw(min) ; use App::Asciio::GTK::Asciio::stripes::editable_exec_box; use App::Asciio::GTK::Asciio::stripes::editable_box2; @@ -477,11 +477,59 @@ if($self->{DRAW_HINT_LINES}) $gc->stroke() ; } +$self->display_bindings_completion($gc, $character_width, $character_height) ; + return TRUE; } #----------------------------------------------------------------------------- +sub display_bindings_completion +{ +my ($self, $gc, $character_width, $character_height) = @_ ; + +if ($self->{USE_BINDINGS_COMPLETION} && defined $self->{BINDINGS_COMPLETION}) + { + $gc->set_source_rgb(@{$self->get_color('hint_background')}) ; + + my ($width, $height) = ($self->{BINDINGS_COMPLETION_LENGTH} * $character_width, $character_height * $self->{BINDINGS_COMPLETION}->@*) ; + + my ($window_width, $window_height) = $self->{root_window}->get_size() ; + + my $start_x ; + if ($window_width < (($self->{MOUSE_X} + 3) * $character_width) + $width) + { + $start_x = (($self->{MOUSE_X} - 3) * $character_width) - $width ; + } + else + { + $start_x = ($self->{MOUSE_X} + 3) * $character_width ; + } + + my $start_y = min($window_height - $height , ($self->{MOUSE_Y} + 1) * $character_height) ; + + $gc->rectangle($start_x, $start_y, $width, $height) ; + $gc->fill() ; + + my $surface = Cairo::ImageSurface->create('argb32', $width, $height) ; + my $gco = Cairo::Context->create($surface) ; + + my $layout = Pango::Cairo::create_layout($gco) ; + my $font_description = Pango::FontDescription->from_string($self->get_font_as_string()) ; + $layout->set_font_description($font_description) ; + + $layout->set_text(join "\n", $self->{BINDINGS_COMPLETION}->@*) ; + Pango::Cairo::show_layout($gco, $layout) ; + + $gc->set_source_surface($surface, $start_x, $start_y) ; + $gc->paint; + + $gc->stroke() ; + } +} + +#----------------------------------------------------------------------------- + sub draw_cross_overlays { my ($self, $gc, $widget_width, $widget_height, $character_width, $character_height) = @_ ; diff --git a/lib/App/Asciio/Setup.pm b/lib/App/Asciio/Setup.pm index fe24df51..437a0629 100644 --- a/lib/App/Asciio/Setup.pm +++ b/lib/App/Asciio/Setup.pm @@ -132,6 +132,8 @@ my $installed = find_installed('App::Asciio') ; my ($basename, $path, $ext) = File::Basename::fileparse($installed, ('\..*')) ; my $asciio_setup_path = $path . $basename . '/setup/' ; +my %first_level_group ; + for my $action_file (@{ $action_files }) { my $context = new Eval::Context() ; @@ -152,6 +154,7 @@ for my $action_file (@{ $action_files }) INSTALL_SUBS => { register_action_handlers => sub { %action_handlers = @_ ; }, register_action_handlers_remove_old_shortcuts => sub { %action_handlers = @_ ; $remove_old_shortcuts++ ; }, + register_first_level_group => sub { %first_level_group = (%first_level_group, @_) ; }, }, PRE_CODE => "use strict;\nuse warnings;\n", CODE_FROM_FILE => $location, @@ -265,6 +268,14 @@ for my $action_file (@{ $action_files }) } } } + +my $action_handler = $self->setup_first_level_group(\%first_level_group) ; +my $name = $action_handler->{SHORTCUTS}[0] ; + +if (defined $name) + { + $self->{ACTIONS}{$name} = $action_handler ; + } } #------------------------------------------------------------------------------------------------------ @@ -276,6 +287,7 @@ my $name = $action_handler->{NAME} ; if(exists $self->{ACTIONS_BY_NAME}{$name}) { + my $reused = '' ; print "\e[33mOverriding action: '$name', file: '$action_file', old_file: '" . ($self->{ACTIONS_BY_NAME}{ORIGINS}{$name}{ORIGIN} // 'unknown') ; my $old_handler = $self->{ACTIONS_BY_NAME}{$name} ; @@ -285,7 +297,6 @@ if(exists $self->{ACTIONS_BY_NAME}{$name}) die "\tno shortcuts in definition\n" ; } - my $reused = '' ; if(! defined $action_handler->{CODE} && defined $old_handler->{CODE}) { $reused .= ", reused code" ; @@ -316,6 +327,37 @@ if(exists $self->{ACTIONS_BY_NAME}{$name}) #------------------------------------------------------------------------------------------------------ +sub setup_first_level_group +{ +my ($self, $group_definition) = @_ ; + +my %handler ; + +for my $name ( grep { $_ ne 'SHORTCUT' } keys %{$group_definition} ) + { + die "Asciio: Group 'first_level' entry '$name' not defined\n" unless exists $self->{ACTIONS_BY_NAME}{$name} ; + my $handler = $self->{ACTIONS_BY_NAME}{$name} ; + + for my $shortcut ('ARRAY' eq ref $handler->{SHORTCUTS} ? $handler->{SHORTCUTS}->@* : $handler->{SHORTCUTS}) + { + $handler{$shortcut} = $handler + } + } + +@handler{'IS_GROUP', 'ENTER_GROUP', 'ESCAPE_KEY', 'SHORTCUTS', 'CODE', 'NAME', 'ORIGIN'} = + ( + 1, + $group_definition->{ENTER_GROUP}, + $group_definition->{ESCAPE_KEY}, + [ $group_definition->{SHORTCUT} ], + sub { $_[0]->{CURRENT_ACTIONS} = \%handler }, + 'first_level_group', + 'action_file' + ) ; + +return \%handler ; +} + sub get_group_action_handler { my ($self, $setup_path, $action_file, $group_name, $group_definition) = @_ ; diff --git a/lib/App/Asciio/ZBuffer.pm b/lib/App/Asciio/ZBuffer.pm index d34f7b5d..33704535 100644 --- a/lib/App/Asciio/ZBuffer.pm +++ b/lib/App/Asciio/ZBuffer.pm @@ -150,6 +150,34 @@ return ($x-1) .';'. ($y+1), $x .';'. ($y+1), ($x+1) .';'. ($y+1) } } +# ------------------------------------------------------------------------------ + +# sub get_cardinal_neighbors +# { +# my ($self, $coordinate) = @_ ; +# my ($x, $y) = split ';', $coordinate ; + +# return +# { +# map +# { +# exists $self->{coordinates}{$_} +# ? ( $self->{coordinates}{$_} ne ' ' ? ($_ => $self->{coordinates}{$_}) : undef) +# : undef +# } +# $x .';'. ($y-1), +# $x .';'. ($y+1), +# ($x+1) .';'. $y, +# ($x-1) .';'. $y, +# ($x+1) .';'. ($y-1), +# ($x+1) .';'. ($y+1), +# ($x-1) .';'. ($y+1), +# ($x-1) .';'. ($y-1) ; +# } +# } + + +# my ($up, $down, $left, $right, $char_45, $char_135, $char_225, $char_315) = $zbuffer->get_cardinal_neighbors() ; # ------------------------------------------------------------------------------ diff --git a/setup/Text/asciio_object/basic.pl b/setup/Text/asciio_object/basic.pl index 72913471..f584c6c5 100644 --- a/setup/Text/asciio_object/basic.pl +++ b/setup/Text/asciio_object/basic.pl @@ -9,6 +9,7 @@ }, TAB_AS_SPACES => ' ', +USE_BINDINGS_COMPLETION => 0, # use ANSI colors COLOR_SCHEMES => diff --git a/setup/actions/default_bindings.pl b/setup/actions/default_bindings.pl index 3b869b05..dc0832e9 100644 --- a/setup/actions/default_bindings.pl +++ b/setup/actions/default_bindings.pl @@ -1,4 +1,5 @@ +use App::Asciio::Actions ; use App::Asciio::Actions::Align ; use App::Asciio::Actions::Arrow ; use App::Asciio::Actions::Asciio ; @@ -24,116 +25,109 @@ register_action_handlers ( -'flip cross mode' => [ '000-x', sub { $_[0]->{USE_CROSS_MODE} ^= 1 ; $_[0]->update_display ; } ], - -'Undo' => [['C00-z', '000-u'], \&App::Asciio::Actions::Unsorted::undo ], -'Redo' => [['C00-y', 'C00-r'], \&App::Asciio::Actions::Unsorted::redo ], -'Zoom in' => [['000-plus', 'C00-j', 'C00-scroll-up'], \&App::Asciio::Actions::Unsorted::zoom, 1 ], -'Zoom out' => [['000-minus', 'C00-h', 'C00-scroll-down'],\&App::Asciio::Actions::Unsorted::zoom, -1 ], -'Copy to clipboard' => [['C00-c', 'C00-Insert', 'y'], \&App::Asciio::Actions::Clipboard::copy_to_clipboard ], -'Insert from clipboard' => [['C00-v', '00S-Insert', 'p'], \&App::Asciio::Actions::Clipboard::insert_from_clipboard ], -'Export to clipboard & primary as ascii' => [['C00-e', '00S-Y', 'Y'], \&App::Asciio::Actions::Clipboard::export_to_clipboard_as_ascii ], -'Export to clipboard & primary as markup'=> ['C0S-E', \&App::Asciio::Actions::Clipboard::export_to_clipboard_as_markup ], -'Import from primary to box' => [['C0S-V', '00S-P', 'P'], \&App::Asciio::Actions::Clipboard::import_from_primary_to_box ], -'Import from primary to text' => [['0A0-p','A-P'], \&App::Asciio::Actions::Clipboard::import_from_primary_to_text ], -'Import from clipboard to box' => [ '0AS-E' , \&App::Asciio::Actions::Clipboard::import_from_clipboard_to_box ], -'Import from clipboard to text' => [ '0AS-T' , \&App::Asciio::Actions::Clipboard::import_from_clipboard_to_text ], - -'Select next element' => [['000-Tab', '000-n'], \&App::Asciio::Actions::ElementsManipulation::select_element_direction, [1, 0, 0] ], -'Select previous element' => [['00S-ISO_Left_Tab', '00S-N'], \&App::Asciio::Actions::ElementsManipulation::select_element_direction, [0, 0, 0] ], -'Select next non arrow' => [['C00-Tab', 'C00-n'], \&App::Asciio::Actions::ElementsManipulation::select_element_direction, [1, 0, 1] ], -'Select previous non arrow' => [['C0S-ISO_Left_Tab', 'C0S-N'], \&App::Asciio::Actions::ElementsManipulation::select_element_direction, [0, 0, 1] ], -'Select next arrow' => [['CA0-Tab', 'C00-m'], \&App::Asciio::Actions::ElementsManipulation::select_element_direction, [1, 0, 2] ], -'Select previous arrow' => [['CAS-ISO_Left_Tab', 'C0S-M'], \&App::Asciio::Actions::ElementsManipulation::select_element_direction, [0, 0, 2] ], - -'Select element by id' => ['0A0-Tab', \&App::Asciio::Actions::ElementsManipulation::select_element_by_id ], - -'Select all elements' => [['C00-a', '00S-V'], \&App::Asciio::Actions::ElementsManipulation::select_all_elements ], -'Deselect all elements' => ['000-Escape', \&App::Asciio::Actions::ElementsManipulation::deselect_all_elements ], -'Select connected elements' => ['000-v', \&App::Asciio::Actions::ElementsManipulation::select_connected ], -'Select elements by word' => ['C00-f', \&App::Asciio::Actions::ElementsManipulation::select_all_elements_by_words ], -'Select elements by word no group' => ['C0S-F', \&App::Asciio::Actions::ElementsManipulation::select_all_elements_by_words_no_group ], - -'Delete selected elements' => [['000-Delete', '000-d'], \&App::Asciio::Actions::ElementsManipulation::delete_selected_elements ], - -'Edit selected element' => [['000-2button-press-1','000-Return'], \&App::Asciio::Actions::ElementsManipulation::edit_selected_element, 0 ], -'Edit selected element inline' => [['C00-2button-press-1','C00-Return'], \&App::Asciio::Actions::ElementsManipulation::edit_selected_element, 1 ], - -'Move selected elements left' => ['000-Left', \&App::Asciio::Actions::ElementsManipulation::move_selection_left ], -'Move selected elements right' => ['000-Right', \&App::Asciio::Actions::ElementsManipulation::move_selection_right ], -'Move selected elements up' => ['000-Up', \&App::Asciio::Actions::ElementsManipulation::move_selection_up ], -'Move selected elements down' => ['000-Down', \&App::Asciio::Actions::ElementsManipulation::move_selection_down ], - -'Move selected elements left quick' => ['0A0-Left', \&App::Asciio::Actions::ElementsManipulation::move_selection_left, 10 ], -'Move selected elements right quick' => ['0A0-Right', \&App::Asciio::Actions::ElementsManipulation::move_selection_right, 10 ], -'Move selected elements up quick' => ['0A0-Up', \&App::Asciio::Actions::ElementsManipulation::move_selection_up, 10 ], -'Move selected elements down quick' => ['0A0-Down', \&App::Asciio::Actions::ElementsManipulation::move_selection_down, 10 ], - -'Move selected elements left 2' => [['000-h', 'h'], \&App::Asciio::Actions::ElementsManipulation::move_selection_left ], -'Move selected elements right 2' => [['000-l', 'l'], \&App::Asciio::Actions::ElementsManipulation::move_selection_right ], -'Move selected elements up 2' => [['000-k', 'k'], \&App::Asciio::Actions::ElementsManipulation::move_selection_up ], -'Move selected elements down 2' => [['000-j', 'j'], \&App::Asciio::Actions::ElementsManipulation::move_selection_down ], - -'Shrink box' => ['000-s', \&App::Asciio::Actions::ElementsManipulation::shrink_box ], - -'Make element narrower' => ['000-1', \&App::Asciio::Actions::ElementsManipulation::resize_element_offset, [-1, 0] ], -'Make element taller' => ['000-2', \&App::Asciio::Actions::ElementsManipulation::resize_element_offset, [0, 1] ], -'Make element shorter' => ['000-3', \&App::Asciio::Actions::ElementsManipulation::resize_element_offset, [0, -1] ], -'Make element wider' => ['000-4', \&App::Asciio::Actions::ElementsManipulation::resize_element_offset, [1, 0] ], - -'Make elements Unicode' => ['C00-u', \&App::Asciio::Actions::Asciio::make_selection_unicode, 1 ], -'Make elements not Unicode' => ['C0S-U', \&App::Asciio::Actions::Asciio::make_selection_unicode, 0 ], +'Undo' => [['C00-z', '000-u'], \&App::Asciio::Actions::Unsorted::undo ], +'Redo' => [['C00-y', 'C00-r'], \&App::Asciio::Actions::Unsorted::redo ], +'Zoom in' => [['000-plus', 'C00-j', 'C00-scroll-up'], \&App::Asciio::Actions::Unsorted::zoom, 1 ], +'Zoom out' => [['000-minus', 'C00-h', 'C00-scroll-down'],\&App::Asciio::Actions::Unsorted::zoom, -1 ], + +'Select next element' => [['000-Tab', '000-n'], \&App::Asciio::Actions::ElementsManipulation::select_element_direction, [1, 0, 0] ], +'Select previous element' => [['00S-ISO_Left_Tab', '00S-N'], \&App::Asciio::Actions::ElementsManipulation::select_element_direction, [0, 0, 0] ], +'Select next non arrow' => [['C00-Tab', 'C00-n'], \&App::Asciio::Actions::ElementsManipulation::select_element_direction, [1, 0, 1] ], +'Select previous non arrow' => [['C0S-ISO_Left_Tab', 'C0S-N'], \&App::Asciio::Actions::ElementsManipulation::select_element_direction, [0, 0, 1] ], +'Select next arrow' => [['CA0-Tab', 'C00-m'], \&App::Asciio::Actions::ElementsManipulation::select_element_direction, [1, 0, 2] ], +'Select previous arrow' => [['CAS-ISO_Left_Tab', 'C0S-M'], \&App::Asciio::Actions::ElementsManipulation::select_element_direction, [0, 0, 2] ], + +'Select all elements' => [['C00-a', '00S-V'], \&App::Asciio::Actions::ElementsManipulation::select_all_elements ], +'Deselect all elements' => ['000-Escape', \&App::Asciio::Actions::ElementsManipulation::deselect_all_elements ], +'Select connected elements' => ['000-v', \&App::Asciio::Actions::ElementsManipulation::select_connected ], +'Select elements by word' => ['C00-f', \&App::Asciio::Actions::ElementsManipulation::select_all_elements_by_words ], +'Select elements by word no group' => ['C0S-F', \&App::Asciio::Actions::ElementsManipulation::select_all_elements_by_words_no_group ], + +'Delete selected elements' => [['000-Delete', '000-d'], \&App::Asciio::Actions::ElementsManipulation::delete_selected_elements ], + +'Edit selected element' => [['000-2button-press-1','000-Return'], \&App::Asciio::Actions::ElementsManipulation::edit_selected_element, 0 ], +'Edit selected element inline' => [['C00-2button-press-1','C00-Return'], \&App::Asciio::Actions::ElementsManipulation::edit_selected_element, 1 ], + +'Move selected elements left' => ['000-Left', \&App::Asciio::Actions::ElementsManipulation::move_selection_left ], +'Move selected elements right' => ['000-Right', \&App::Asciio::Actions::ElementsManipulation::move_selection_right ], +'Move selected elements up' => ['000-Up', \&App::Asciio::Actions::ElementsManipulation::move_selection_up ], +'Move selected elements down' => ['000-Down', \&App::Asciio::Actions::ElementsManipulation::move_selection_down ], + +'Move selected elements left quick' => ['0A0-Left', \&App::Asciio::Actions::ElementsManipulation::move_selection_left, 10 ], +'Move selected elements right quick' => ['0A0-Right', \&App::Asciio::Actions::ElementsManipulation::move_selection_right, 10 ], +'Move selected elements up quick' => ['0A0-Up', \&App::Asciio::Actions::ElementsManipulation::move_selection_up, 10 ], +'Move selected elements down quick' => ['0A0-Down', \&App::Asciio::Actions::ElementsManipulation::move_selection_down, 10 ], + +'Move selected elements left 2' => [['000-h', 'h'], \&App::Asciio::Actions::ElementsManipulation::move_selection_left ], +'Move selected elements right 2' => [['000-l', 'l'], \&App::Asciio::Actions::ElementsManipulation::move_selection_right ], +'Move selected elements up 2' => [['000-k', 'k'], \&App::Asciio::Actions::ElementsManipulation::move_selection_up ], +'Move selected elements down 2' => [['000-j', 'j'], \&App::Asciio::Actions::ElementsManipulation::move_selection_down ], # mouse -'Mouse right-click' => ['000-button-press-3', \&App::Asciio::Actions::Mouse::mouse_right_click ], +'Mouse right-click' => ['000-button-press-3', \&App::Asciio::Actions::Mouse::mouse_right_click ], -'Mouse left-click' => ['000-button-press-1', \&App::Asciio::Actions::Mouse::mouse_left_click ], -'Mouse expand selection' => ['00S-button-press-1', \&App::Asciio::Actions::Mouse::expand_selection ], -'Mouse selection flip' => ['C00-button-press-1', \&App::Asciio::Actions::Mouse::mouse_element_selection_flip ], +'Mouse left-click' => ['000-button-press-1', \&App::Asciio::Actions::Mouse::mouse_left_click ], +'Mouse expand selection' => ['00S-button-press-1', \&App::Asciio::Actions::Mouse::expand_selection ], +'Mouse selection flip' => ['C00-button-press-1', \&App::Asciio::Actions::Mouse::mouse_element_selection_flip ], -'Mouse quick link' => [['0A0-button-press-1', '000-period'], \&App::Asciio::Actions::Mouse::quick_link ], -'Mouse duplicate elements' => [['0AS-button-press-1', '000-comma'], \&App::Asciio::Actions::Mouse::mouse_duplicate_element ], -'Mouse quick box' => [['C0S-button-press-1'], \&App::Asciio::Actions::Elements::add_element, ['Asciio/box', 0] ], +'Mouse quick link' => [['0A0-button-press-1', '000-period'], \&App::Asciio::Actions::Mouse::quick_link ], +'Mouse duplicate elements' => [['0AS-button-press-1', '000-comma'], \&App::Asciio::Actions::Mouse::mouse_duplicate_element ], +'Mouse quick box' => [['C0S-button-press-1'], \&App::Asciio::Actions::Elements::add_element, ['Asciio/box', 0] ], -'Arrow to mouse' => ['CA0-motion_notify', \&App::Asciio::Actions::Arrow::interactive_to_mouse ], -'Arrow mouse change direction' => ['CA0-2button-press-1', \&App::Asciio::Actions::Arrow::change_arrow_direction ], -'Arrow change direction' => ['CA0-d', \&App::Asciio::Actions::Arrow::interactive_change_arrow_direction ], -'Wirl arrow add section' => ['CA0-button-press-1', \&App::Asciio::Actions::Multiwirl::interactive_add_section ], -'Wirl arrow insert flex point' => ['CA0-button-press-2', \&App::Asciio::Actions::Multiwirl::insert_wirl_arrow_section ], +'Arrow to mouse' => ['CA0-motion_notify', \&App::Asciio::Actions::Arrow::interactive_to_mouse ], +'Arrow mouse change direction' => ['CA0-2button-press-1', \&App::Asciio::Actions::Arrow::change_arrow_direction ], +'Arrow change direction' => ['CA0-d', \&App::Asciio::Actions::Arrow::interactive_change_arrow_direction ], +'Wirl arrow add section' => ['CA0-button-press-1', \&App::Asciio::Actions::Multiwirl::interactive_add_section ], +'Wirl arrow insert flex point' => ['CA0-button-press-2', \&App::Asciio::Actions::Multiwirl::insert_wirl_arrow_section ], -'Mouse motion' => ['000-motion_notify', \&App::Asciio::Actions::Mouse::mouse_motion ], -'Mouse motion 2' => ['0AS-motion_notify', \&App::Asciio::Actions::Mouse::mouse_motion ], -'Mouse drag canvas' => ['C00-motion_notify', \&App::Asciio::Actions::Mouse::mouse_drag_canvas ], +'Mouse motion' => ['000-motion_notify', \&App::Asciio::Actions::Mouse::mouse_motion ], +'Mouse motion 2' => ['0AS-motion_notify', \&App::Asciio::Actions::Mouse::mouse_motion ], +'Mouse drag canvas' => ['C00-motion_notify', \&App::Asciio::Actions::Mouse::mouse_drag_canvas ], # mouse emulation -'Mouse emulation toggle' => [['000-apostrophe', "'"], \&App::Asciio::Actions::Mouse::toggle_mouse ], +'Mouse emulation toggle' => [['000-apostrophe', "'"], \&App::Asciio::Actions::Mouse::toggle_mouse ], -'Mouse emulation left-click' => ['000-odiaeresis', \&App::Asciio::Actions::Mouse::mouse_left_click ], -'Mouse emulation expand selection' => ['00S-Odiaeresis', \&App::Asciio::Actions::Mouse::expand_selection ], -'Mouse emulation selection flip' => ['C00-odiaeresis', \&App::Asciio::Actions::Mouse::mouse_element_selection_flip ], +'Mouse emulation left-click' => ['000-odiaeresis', \&App::Asciio::Actions::Mouse::mouse_left_click ], +'Mouse emulation expand selection' => ['00S-Odiaeresis', \&App::Asciio::Actions::Mouse::expand_selection ], +'Mouse emulation selection flip' => ['C00-odiaeresis', \&App::Asciio::Actions::Mouse::mouse_element_selection_flip ], -'Mouse emulation right-click' => ['000-adiaeresis', \&App::Asciio::Actions::Mouse::mouse_right_click ], +'Mouse emulation right-click' => ['000-adiaeresis', \&App::Asciio::Actions::Mouse::mouse_right_click ], -'Mouse emulation move left' => ['C00-Left', \&App::Asciio::Actions::Mouse::mouse_move, [-1, 0] ], -'Mouse emulation move right' => ['C00-Right', \&App::Asciio::Actions::Mouse::mouse_move, [ 1, 0] ], -'Mouse emulation move up' => ['C00-Up', \&App::Asciio::Actions::Mouse::mouse_move, [ 0, -1] ], -'Mouse emulation move down' => ['C00-Down', \&App::Asciio::Actions::Mouse::mouse_move, [ 0, 1] ], +'Mouse emulation move left' => ['C00-Left', \&App::Asciio::Actions::Mouse::mouse_move, [-1, 0] ], +'Mouse emulation move right' => ['C00-Right', \&App::Asciio::Actions::Mouse::mouse_move, [ 1, 0] ], +'Mouse emulation move up' => ['C00-Up', \&App::Asciio::Actions::Mouse::mouse_move, [ 0, -1] ], +'Mouse emulation move down' => ['C00-Down', \&App::Asciio::Actions::Mouse::mouse_move, [ 0, 1] ], -'Mouse emulation drag left' => ['00S-Left', \&App::Asciio::Actions::Mouse::mouse_drag_left ], -'Mouse emulation drag right' => ['00S-Right', \&App::Asciio::Actions::Mouse::mouse_drag_right ], -'Mouse emulation drag up' => ['00S-Up', \&App::Asciio::Actions::Mouse::mouse_drag_up ], -'Mouse emulation drag down' => ['00S-Down', \&App::Asciio::Actions::Mouse::mouse_drag_down ], +'Mouse emulation drag left' => ['00S-Left', \&App::Asciio::Actions::Mouse::mouse_drag_left ], +'Mouse emulation drag right' => ['00S-Right', \&App::Asciio::Actions::Mouse::mouse_drag_right ], +'Mouse emulation drag up' => ['00S-Up', \&App::Asciio::Actions::Mouse::mouse_drag_up ], +'Mouse emulation drag down' => ['00S-Down', \&App::Asciio::Actions::Mouse::mouse_drag_down ], -'Mouse on element id' => ['000-m', \&App::Asciio::Actions::Mouse::mouse_on_element_id ], +'Mouse on element id' => ['000-m', \&App::Asciio::Actions::Mouse::mouse_on_element_id ], -'Asciio context_menu' => ['as_context_menu', undef, undef, \&App::Asciio::Actions::Asciio::context_menu ], -'Box context_menu' => ['bo_context_menu', undef, undef, \&App::Asciio::Actions::Box::context_menu ] , -'Multi_wirl context_menu' => ['mw_context_menu', undef, undef, \&App::Asciio::Actions::Multiwirl::multi_wirl_context_menu ], -'Angled arrow context_menu' => ['aa_ontext menu', undef, undef, \&App::Asciio::Actions::Multiwirl::angled_arrow_context_menu ], -'Ruler context_menu' => ['ru_context_menu', undef, undef, \&App::Asciio::Actions::Ruler::context_menu ], -'Shapes context_menu' => ['sh_context_menu', undef, undef, \&App::Asciio::Actions::Shapes::context_menu ], +'Copy to clipboard' => [['C00-c', 'C00-Insert'], \&App::Asciio::Actions::Clipboard::copy_to_clipboard ], +'Insert from clipboard' => [['C00-v', '00S-Insert'], \&App::Asciio::Actions::Clipboard::insert_from_clipboard ], -'grouping leader' => +'<< yank leader >>' => + { + SHORTCUTS => '000-y', + + 'Copy to clipboard' => ['000-y', \&App::Asciio::Actions::Clipboard::copy_to_clipboard ], + 'Export to clipboard & primary as ascii' => ['00S-Y', \&App::Asciio::Actions::Clipboard::export_to_clipboard_as_ascii ], + 'Export to clipboard & primary as markup'=> ['000-m', \&App::Asciio::Actions::Clipboard::export_to_clipboard_as_markup], + }, + +'<< paste leader >>' => + { + SHORTCUTS => '000-p', + 'Insert from clipboard' => ['000-p', \&App::Asciio::Actions::Clipboard::insert_from_clipboard ], + 'Import from primary to box' => ['00S-P', \&App::Asciio::Actions::Clipboard::import_from_primary_to_box ], + 'Import from primary to text' => ['0A0-p', \&App::Asciio::Actions::Clipboard::import_from_primary_to_text ], + 'Import from clipboard to box' => ['000-b', \&App::Asciio::Actions::Clipboard::import_from_clipboard_to_box ], + 'Import from clipboard to text' => ['000-t', \&App::Asciio::Actions::Clipboard::import_from_clipboard_to_text], + }, + +'<< grouping leader >>' => { SHORTCUTS => '000-g', @@ -144,7 +138,7 @@ 'Temporary move to the front' => ['00S-F', \&App::Asciio::Actions::ElementsManipulation::temporary_move_selected_element_to_front], }, -'stripes leader' => +'<< stripes leader >>' => { SHORTCUTS => '0A0-g', @@ -153,7 +147,7 @@ 'ungroup stripes group' => ['000-u', \&App::Asciio::Actions::ElementsManipulation::ungroup_stripes_group ], }, -'align leader' => +'<< align leader >>' => { SHORTCUTS => '00S-A', @@ -165,26 +159,29 @@ 'Align horizontally' => ['000-h', \&App::Asciio::Actions::Align::align, 'horizontal'], }, -'change color/font leader'=> +'<< change color/font leader >>'=> { SHORTCUTS => '000-z', - 'Change elements foreground color' => ['000-c', \&App::Asciio::Actions::Colors::change_elements_colors, 0 ], - 'Change elements background color' => ['00S-C', \&App::Asciio::Actions::Colors::change_elements_colors, 1 ], - - 'Change Asciio background color' => ['0A0-c', \&App::Asciio::Actions::Colors::change_background_color ], - 'Change grid color' => ['0AS-C', \&App::Asciio::Actions::Colors::change_grid_color ], - 'Flip color scheme' => ['000-s', \&App::Asciio::Actions::Colors::flip_color_scheme ], - 'Flip transparent element background' => ['000-t', \&App::Asciio::Actions::Unsorted::transparent_elements ], - 'Flip grid display' => ['000-g', \&App::Asciio::Actions::Unsorted::flip_grid_display ], - 'Remove rulers' => ['000-r', \&App::Asciio::Actions::Ruler::remove_ruler ], - 'Flip hint lines' => ['000-h', \&App::Asciio::Actions::Unsorted::flip_hint_lines ], - 'Change font' => ['000-f', \&App::Asciio::Actions::Unsorted::change_font ], - 'Edit inline' => ['000-i', \&App::Asciio::GTK::Asciio::switch_gtk_popup_box_type ], - 'show/hide connectors' => ['000-v', \&App::Asciio::Actions::Unsorted::flip_connector_display ], + 'Show/hide binding completion' => ['000-b', sub { $_[0]->{USE_BINDINGS_COMPLETION} ^= 1 ; $_[0]->update_display() ;} ], + + 'flip cross mode' => [ '000-x', sub { $_[0]->{USE_CROSS_MODE} ^= 1 ; $_[0]->update_display ; } ], + + 'Change elements foreground color' => ['000-c', \&App::Asciio::Actions::Colors::change_elements_colors, 0 ], + 'Change elements background color' => ['00S-C', \&App::Asciio::Actions::Colors::change_elements_colors, 1 ], + + 'Change Asciio background color' => ['0A0-c', \&App::Asciio::Actions::Colors::change_background_color ], + 'Change grid color' => ['0AS-C', \&App::Asciio::Actions::Colors::change_grid_color ], + 'Flip color scheme' => ['000-s', \&App::Asciio::Actions::Colors::flip_color_scheme ], + 'Flip transparent element background' => ['000-t', \&App::Asciio::Actions::Unsorted::transparent_elements ], + 'Flip grid display' => ['000-g', \&App::Asciio::Actions::Unsorted::flip_grid_display ], + 'Flip hint lines' => ['000-h', \&App::Asciio::Actions::Unsorted::flip_hint_lines ], + 'Change font' => ['000-f', \&App::Asciio::Actions::Unsorted::change_font ], + 'Edit inline' => ['000-i', \&App::Asciio::GTK::Asciio::switch_gtk_popup_box_type ], + 'Show/hide connectors' => ['000-v', \&App::Asciio::Actions::Unsorted::flip_connector_display ], }, -'arrow leader' => +'<< arrow leader >>' => { SHORTCUTS => '000-a', @@ -198,7 +195,7 @@ 'end no disconnect' => ['C0S-D', \&App::Asciio::Actions::Multiwirl::disable_arrow_connector, 1 ], }, -'debug leader' => +'<< debug leader >>' => { SHORTCUTS => '00S-D', @@ -211,11 +208,13 @@ 'ZBuffer Test' => ['000-z', \&App::Asciio::Actions::ZBuffer::dump_crossings ], }, -'commands leader'=> +'<< commands leader >>'=> { SHORTCUTS => '00S-colon', 'Help' => ['000-h', \&App::Asciio::Actions::Unsorted::display_help ], + 'Add help box' => ['00S-H', \&App::Asciio::Actions::Elements::add_help_box, ], + 'Display keyboard mapping' => ['000-k', \&App::Asciio::Actions::Unsorted::display_keyboard_mapping_in_browser], 'Display commands' => ['000-c', \&App::Asciio::Actions::Unsorted::display_commands ], 'Display action files' => ['000-f', \&App::Asciio::Actions::Unsorted::display_action_files ], @@ -231,16 +230,10 @@ 'Quit no save' => ['00S-Q', \&App::Asciio::Actions::File::quit_no_save ], }, -'Insert leader' => +'<< Insert leader >>' => { SHORTCUTS => '000-i', - # 'Add from file' => [ 'f' ], ??? - - 'Add box' => ['000-b', \&App::Asciio::Actions::Elements::add_element, ['Asciio/box', 0] ], - 'Add unicode box' => ['0A0-b', \&App::Asciio::Actions::Elements::add_element, ['Asciio/box unicode', 0] ], - 'Add shrink box' => ['00S-B', \&App::Asciio::Actions::Elements::add_element, ['Asciio/shrink_box', 1] ], - 'Add text' => ['000-t', \&App::Asciio::Actions::Elements::add_element, ['Asciio/text', 1] ], 'Add arrow' => ['000-a', \&App::Asciio::Actions::Elements::add_element, ['Asciio/wirl_arrow', 0] ], @@ -252,130 +245,230 @@ # } # ] , - 'Add unicode arrow' => ['0A0-a', \&App::Asciio::Actions::Elements::add_element, ['Asciio/wirl_arrow unicode', 0] ], - 'Add angled arrow' => ['00S-A', \&App::Asciio::Actions::Elements::add_element, ['Asciio/angled arrow', 0] ], - 'Add unicode angled arrow' => ['0AS-A', \&App::Asciio::Actions::Elements::add_element, ['Asciio/angled arrow unicode', 0] ], + + 'Add ascii line' => ['000-l', \&App::Asciio::Actions::Elements::add_line, 0 ], + 'Add ascii no-connect line' => ['000-k', \&App::Asciio::Actions::Elements::add_non_connecting_line, 0 ], + + '<< Multiple >>' => ['000-m', sub { $_[0]->use_action_group('group_insert_multiple') ; } ] , + '<< Unicode >>' => ['000-u', sub { $_[0]->use_action_group('group_insert_unicode') ; } ] , + '<< Box >>' => ['000-b', sub { $_[0]->use_action_group('group_insert_box') ; } ] , + '<< Elements >>' => ['000-e', sub { $_[0]->use_action_group('group_insert_element') ; } ] , + '<< Ruler >>' => ['000-r', sub { $_[0]->use_action_group('group_insert_ruler') ; } ] , + }, + +'group_insert_multiple' => + { + SHORTCUTS => 'group_insert_multiple', + + 'Add multiple texts' => ['000-t', \&App::Asciio::Actions::Unsorted::insert_multiple_boxes_from_text_description, 0 ], + 'Add multiple boxes' => ['000-b', \&App::Asciio::Actions::Unsorted::insert_multiple_boxes_from_text_description, 1 ], + }, + +'group_insert_ruler' => + { + SHORTCUTS => 'group_insert_ruler', + + 'Add vertical ruler' => ['000-v', \&App::Asciio::Actions::Ruler::add_ruler, {TYPE => 'VERTICAL'} ], + 'Add horizontal ruler' => ['000-h', \&App::Asciio::Actions::Ruler::add_ruler, {TYPE => 'HORIZONTAL'} ], + 'delete rulers' => ['000-d', \&App::Asciio::Actions::Ruler::remove_ruler ], + }, + +'group_insert_element' => + { + SHORTCUTS => 'group_insert_element', 'Add connector' => ['000-c', \&App::Asciio::Actions::Elements::add_element, ['Asciio/connector', 0] ], 'Add connector type 2' => ['00S-C', \&App::Asciio::Actions::Elements::add_element, ['Asciio/connector2', 0] ], 'Add if' => ['000-i', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Boxes/if', 1] ], 'Add process' => ['000-p', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Boxes/process', 1] ], - 'Add rhombus' => ['000-r', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Shape/rhombus', 0] ], + 'Add rhombus' => ['0A0-r', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Shape/rhombus', 0] ], 'Add ellipse' => ['000-e', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Shape/ellipse', 0] ], + }, + +'group_insert_box' => + { + SHORTCUTS => 'group_insert_box', - 'Add ascii line' => ['000-l', \&App::Asciio::Actions::Elements::add_line, 0 ], - 'Add unicode line' => ['00S-L', \&App::Asciio::Actions::Elements::add_line, 1 ], - 'Add unicode bold line' => ['0A0-l', \&App::Asciio::Actions::Elements::add_line, 2 ], - 'Add unicode double line' => ['0AS-L', \&App::Asciio::Actions::Elements::add_line, 3 ], - - 'Add ascii no-connect line' => ['000-k', \&App::Asciio::Actions::Elements::add_non_connecting_line, 0 ], - 'Add unicode no-connect line' => ['00S-K', \&App::Asciio::Actions::Elements::add_non_connecting_line, 1 ], - 'Add unicode no-connect bold line' => ['0A0-k', \&App::Asciio::Actions::Elements::add_non_connecting_line, 2 ], - 'Add unicode no-connect double line' => ['0AS-K', \&App::Asciio::Actions::Elements::add_non_connecting_line, 3 ], - - 'Add multiple texts' => ['C00-t', \&App::Asciio::Actions::Unsorted::insert_multiple_boxes_from_text_description, 0 ], - 'Add multiple boxes' => ['C00-b', \&App::Asciio::Actions::Unsorted::insert_multiple_boxes_from_text_description, 1 ], + 'Add box' => ['000-b', \&App::Asciio::Actions::Elements::add_element, ['Asciio/box', 0] ], + 'Add shrink box' => ['000-s', \&App::Asciio::Actions::Elements::add_element, ['Asciio/shrink_box', 1] ], 'Add exec box' => ['C00-e', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Boxes/exec', 1] ], 'Add exec box verbatim' => ['C00-v', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Boxes/exec verbatim', 1] ], 'Add exec box verbatim once' => ['C00-o', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Boxes/exec verbatim once', 1] ], 'Add line numbered box' => ['C00-l', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Boxes/exec add lines', 1] ], + }, + +'group_insert_unicode' => + { + SHORTCUTS => 'group_insert_unicode', + + 'Add unicode box' => ['000-b', \&App::Asciio::Actions::Elements::add_element, ['Asciio/box unicode', 0] ], + 'Add unicode arrow' => ['000-a', \&App::Asciio::Actions::Elements::add_element, ['Asciio/wirl_arrow unicode', 0] ], + 'Add unicode angled arrow' => ['00S-A', \&App::Asciio::Actions::Elements::add_element, ['Asciio/angled arrow unicode', 0] ], + 'Add unicode line' => ['000-l', \&App::Asciio::Actions::Elements::add_line, 1 ], + + 'Add unicode bold line' => ['00S-L', \&App::Asciio::Actions::Elements::add_line, 2 ], + 'Add unicode double line' => ['0A0-l', \&App::Asciio::Actions::Elements::add_line, 3 ], - 'Add vertical ruler' => ['C00-r', \&App::Asciio::Actions::Ruler::add_ruler, {TYPE => 'VERTICAL'} ], - 'Add horizontal ruler' => ['C0S-R', \&App::Asciio::Actions::Ruler::add_ruler, {TYPE => 'HORIZONTAL'} ], - 'Add help box' => ['C00-h', \&App::Asciio::Actions::Elements::add_help_box, ], + 'Add unicode no-connect line' => ['000-k', \&App::Asciio::Actions::Elements::add_non_connecting_line, 1 ], + 'Add unicode no-connect bold line' => ['00S-K', \&App::Asciio::Actions::Elements::add_non_connecting_line, 2 ], + 'Add unicode no-connect double line' => ['0A0-K', \&App::Asciio::Actions::Elements::add_non_connecting_line, 3 ], }, -'clone' => +'<< element leader >>' => + { + SHORTCUTS => '000-e', + + 'Shrink box' => ['000-s', \&App::Asciio::Actions::ElementsManipulation::shrink_box ], + + 'Make element narrower' => ['000-1', \&App::Asciio::Actions::ElementsManipulation::resize_element_offset, [-1, 0] ], + 'Make element taller' => ['000-2', \&App::Asciio::Actions::ElementsManipulation::resize_element_offset, [0, 1] ], + 'Make element shorter' => ['000-3', \&App::Asciio::Actions::ElementsManipulation::resize_element_offset, [0, -1] ], + 'Make element wider' => ['000-4', \&App::Asciio::Actions::ElementsManipulation::resize_element_offset, [1, 0] ], + + 'Make elements Unicode' => ['C00-u', \&App::Asciio::Actions::Asciio::make_selection_unicode, 1 ], + 'Make elements not Unicode' => ['C0S-U', \&App::Asciio::Actions::Asciio::make_selection_unicode, 0 ], + }, + +'<< clone leader >>' => { SHORTCUTS => '000-c', ENTER_GROUP => \&App::Asciio::Actions::Clone::clone_enter, ESCAPE_KEY => '000-Escape', - 'clone escape' => [ '000-Escape', \&App::Asciio::Actions::Clone::clone_escape ], - 'clone motion' => [ '000-motion_notify', \&App::Asciio::Actions::Clone::clone_mouse_motion ], - - 'clone insert' => [ '000-button-press-1', \&App::Asciio::Actions::Clone::clone_add_element ], - 'clone insert2' => [ '000-Return', \&App::Asciio::Actions::Clone::clone_add_element ], - 'clone arrow' => [ '000-a', \&App::Asciio::Actions::Clone::clone_set_overlay, ['Asciio/wirl_arrow', 0] ], - 'clone angled arrow' => [ '00S-A', \&App::Asciio::Actions::Clone::clone_set_overlay, ['Asciio/angled_arrow', 0] ], - 'clone box' => [ '000-b', \&App::Asciio::Actions::Clone::clone_set_overlay, ['Asciio/box', 0] ], - 'clone text' => [ '000-t', \&App::Asciio::Actions::Clone::clone_set_overlay, ['Asciio/text', 0] ], - 'clone flip hint lines' => [ '000-h', \&App::Asciio::Actions::Unsorted::flip_hint_lines ], - - 'clone left' => ['000-Left', \&App::Asciio::Actions::ElementsManipulation::move_selection_left ], - 'clone right' => ['000-Right', \&App::Asciio::Actions::ElementsManipulation::move_selection_right ], - 'clone up' => ['000-Up', \&App::Asciio::Actions::ElementsManipulation::move_selection_up ], - 'clone down' => ['000-Down', \&App::Asciio::Actions::ElementsManipulation::move_selection_down ], - - 'clone emulation left' => ['C00-Left', \&App::Asciio::Actions::Mouse::mouse_move, [-1, 0] ], - 'clone emulation right' => ['C00-Right', \&App::Asciio::Actions::Mouse::mouse_move, [ 1, 0] ], - 'clone emulation up' => ['C00-Up', \&App::Asciio::Actions::Mouse::mouse_move, [ 0, -1] ], - 'clone emulation down' => ['C00-Down', \&App::Asciio::Actions::Mouse::mouse_move, [ 0, 1] ], + 'clone escape' => [ '000-Escape', \&App::Asciio::Actions::Clone::clone_escape ], + 'clone motion' => [ '000-motion_notify', \&App::Asciio::Actions::Clone::clone_mouse_motion ], + + 'clone insert' => [ '000-button-press-1', \&App::Asciio::Actions::Clone::clone_add_element ], + 'clone insert2' => [ '000-Return', \&App::Asciio::Actions::Clone::clone_add_element ], + 'clone arrow' => [ '000-a', \&App::Asciio::Actions::Clone::clone_set_overlay, ['Asciio/wirl_arrow', 0] ], + 'clone angled arrow' => [ '00S-A', \&App::Asciio::Actions::Clone::clone_set_overlay, ['Asciio/angled_arrow', 0] ], + 'clone box' => [ '000-b', \&App::Asciio::Actions::Clone::clone_set_overlay, ['Asciio/box', 0] ], + 'clone text' => [ '000-t', \&App::Asciio::Actions::Clone::clone_set_overlay, ['Asciio/text', 0] ], + 'clone flip hint lines' => [ '000-h', \&App::Asciio::Actions::Unsorted::flip_hint_lines ], + + 'clone left' => ['000-Left', \&App::Asciio::Actions::ElementsManipulation::move_selection_left ], + 'clone right' => ['000-Right', \&App::Asciio::Actions::ElementsManipulation::move_selection_right ], + 'clone up' => ['000-Up', \&App::Asciio::Actions::ElementsManipulation::move_selection_up ], + 'clone down' => ['000-Down', \&App::Asciio::Actions::ElementsManipulation::move_selection_down ], + + 'clone emulation left' => ['C00-Left', \&App::Asciio::Actions::Mouse::mouse_move, [-1, 0] ], + 'clone emulation right' => ['C00-Right', \&App::Asciio::Actions::Mouse::mouse_move, [ 1, 0] ], + 'clone emulation up' => ['C00-Up', \&App::Asciio::Actions::Mouse::mouse_move, [ 0, -1] ], + 'clone emulation down' => ['C00-Down', \&App::Asciio::Actions::Mouse::mouse_move, [ 0, 1] ], }, -'git' => +'<< git leader >>' => { SHORTCUTS => '00S-G', ESCAPE_KEY => '000-Escape', - 'Quick git' => [['000-button-press-3', '000-g'], \&App::Asciio::Actions::Git::quick_link ], + 'Show git bindings' => ['00S-question', sub { $_[0]->create_binding_completions(1) ; } ], - 'Git add box' => [ '000-b', \&App::Asciio::Actions::Elements::add_element, ['Asciio/box', 1] ], - 'Git add text' => [ '000-t', \&App::Asciio::Actions::Elements::add_element, ['Asciio/text', 1] ], - 'Git add arrow' => [ '000-a', \&App::Asciio::Actions::Elements::add_element, ['Asciio/wirl_arrow', 0]], - 'Git edit selected element' => [['000-2button-press-1', '000-Return'], \&App::Asciio::Actions::Git::edit_selected_element ], + 'Quick git' => [['000-button-press-3', '000-c'], \&App::Asciio::Actions::Git::quick_link ], - 'Git mouse left-click' => [ '000-button-press-1', \&App::Asciio::Actions::Mouse::mouse_left_click ], - 'Git change arrow direction' => [ '000-d', \&App::Asciio::Actions::Arrow::change_arrow_direction ], - 'Git undo' => [ '000-u', \&App::Asciio::Actions::Unsorted::undo ], - 'Git delete elements' => [['000-Delete', '000-x'], \&App::Asciio::Actions::ElementsManipulation::delete_selected_elements ], + 'Git add box' => [ '000-b', \&App::Asciio::Actions::Elements::add_element, ['Asciio/box', 1] ], + 'Git add text' => [ '000-t', \&App::Asciio::Actions::Elements::add_element, ['Asciio/text', 1] ], + 'Git add arrow' => [ '000-a', \&App::Asciio::Actions::Elements::add_element, ['Asciio/wirl_arrow', 0]], + 'Git edit selected element' => [['000-2button-press-1', '000-Return'], \&App::Asciio::Actions::Git::edit_selected_element ], - 'Git mouse motion' => [ '000-motion_notify', \&App::Asciio::Actions::Mouse::mouse_motion ], - 'Git move elements left' => [ '000-Left', \&App::Asciio::Actions::ElementsManipulation::move_selection_left ], - 'Git move elements right' => [ '000-Right', \&App::Asciio::Actions::ElementsManipulation::move_selection_right ], - 'Git move elements up' => [ '000-Up', \&App::Asciio::Actions::ElementsManipulation::move_selection_up ], - 'Git move elements down' => [ '000-Down', \&App::Asciio::Actions::ElementsManipulation::move_selection_down ], + 'Git mouse left-click' => [ '000-button-press-1', \&App::Asciio::Actions::Mouse::mouse_left_click ], + 'Git change arrow direction' => [ '000-d', \&App::Asciio::Actions::Arrow::change_arrow_direction ], + 'Git undo' => [ '000-u', \&App::Asciio::Actions::Unsorted::undo ], + 'Git delete elements' => [['000-Delete', '000-x'], \&App::Asciio::Actions::ElementsManipulation::delete_selected_elements ], - 'Git mouse right-click' => [ '0A0-button-press-3', \&App::Asciio::Actions::Mouse::mouse_right_click ], - 'Git flip hint lines' => [ '000-h', \&App::Asciio::Actions::Unsorted::flip_hint_lines ], + 'Git mouse motion' => [ '000-motion_notify', \&App::Asciio::Actions::Mouse::mouse_motion ], + 'Git move elements left' => [ '000-Left', \&App::Asciio::Actions::ElementsManipulation::move_selection_left ], + 'Git move elements right' => [ '000-Right', \&App::Asciio::Actions::ElementsManipulation::move_selection_right ], + 'Git move elements up' => [ '000-Up', \&App::Asciio::Actions::ElementsManipulation::move_selection_up ], + 'Git move elements down' => [ '000-Down', \&App::Asciio::Actions::ElementsManipulation::move_selection_down ], + + 'Git mouse right-click' => [ '0A0-button-press-3', \&App::Asciio::Actions::Mouse::mouse_right_click ], + 'Git flip hint lines' => [ '000-h', \&App::Asciio::Actions::Unsorted::flip_hint_lines ], }, -'slides leader' => +'<< slides leader >>' => { SHORTCUTS => '00S-S', - 'Load slides' => ['000-l', \&App::Asciio::Actions::Presentation::load_slides ] , - 'previous slide' => ['00S-N', \&App::Asciio::Actions::Presentation::previous_slide], - 'next slide' => ['000-n', \&App::Asciio::Actions::Presentation::next_slide ], - 'first slide' => ['000-g', \&App::Asciio::Actions::Presentation::first_slide ], - 'show previous message' => ['000-m', \&App::Asciio::Actions::Presentation::show_previous_message], - 'show next message' => ['00S-M', \&App::Asciio::Actions::Presentation::show_next_message], + 'Load slides' => ['000-l', \&App::Asciio::Actions::Presentation::load_slides ] , + 'previous slide' => ['00S-N', \&App::Asciio::Actions::Presentation::previous_slide], + 'next slide' => ['000-n', \&App::Asciio::Actions::Presentation::next_slide ], + 'first slide' => ['000-g', \&App::Asciio::Actions::Presentation::first_slide ], + 'show previous message' => ['000-m', \&App::Asciio::Actions::Presentation::show_previous_message], + 'show next message' => ['00S-M', \&App::Asciio::Actions::Presentation::show_next_message], }, -'move arrow ends' => +'<< move arrow ends leader >>' => { SHORTCUTS => '0A0-a', ESCAPE_KEY => '000-Escape', - 'arrow start up' => [ '000-Up', \&App::Asciio::Actions::Arrow::move_arrow_start, [ 0, -1] ], - 'arrow start down' => [ '000-Down', \&App::Asciio::Actions::Arrow::move_arrow_start, [ 0, 1] ], - 'arrow start right' => [ '000-Right', \&App::Asciio::Actions::Arrow::move_arrow_start, [ 1, 0] ], - 'arrow start left' => [ '000-Left', \&App::Asciio::Actions::Arrow::move_arrow_start, [-1, 0] ], - 'arrow start up2' => [ '000-k', \&App::Asciio::Actions::Arrow::move_arrow_start, [ 0, -1] ], - 'arrow start down2' => [ '000-j', \&App::Asciio::Actions::Arrow::move_arrow_start, [ 0, 1] ], - 'arrow start right2' => [ '000-l', \&App::Asciio::Actions::Arrow::move_arrow_start, [ 1, 0] ], - 'arrow start left2' => [ '000-h', \&App::Asciio::Actions::Arrow::move_arrow_start, [-1, 0] ], - 'arrow end up' => [ '00S-Up', \&App::Asciio::Actions::Arrow::move_arrow_end, [ 0, -1] ], - 'arrow end down' => [ '00S-Down', \&App::Asciio::Actions::Arrow::move_arrow_end, [ 0, 1] ], - 'arrow end right' => [ '00S-Right', \&App::Asciio::Actions::Arrow::move_arrow_end, [ 1, 0] ], - 'arrow end left' => [ '00S-Left', \&App::Asciio::Actions::Arrow::move_arrow_end, [-1, 0] ], - 'arrow end up2' => [ '00S-K', \&App::Asciio::Actions::Arrow::move_arrow_end, [ 0, -1] ], - 'arrow end down2' => [ '00S-J', \&App::Asciio::Actions::Arrow::move_arrow_end, [ 0, 1] ], - 'arrow end right2' => [ '00S-L', \&App::Asciio::Actions::Arrow::move_arrow_end, [ 1, 0] ], - 'arrow end left2' => [ '00S-H', \&App::Asciio::Actions::Arrow::move_arrow_end, [-1, 0] ], + 'arrow start up' => [ '000-Up', \&App::Asciio::Actions::Arrow::move_arrow_start, [ 0, -1] ], + 'arrow start down' => [ '000-Down', \&App::Asciio::Actions::Arrow::move_arrow_start, [ 0, 1] ], + 'arrow start right' => [ '000-Right', \&App::Asciio::Actions::Arrow::move_arrow_start, [ 1, 0] ], + 'arrow start left' => [ '000-Left', \&App::Asciio::Actions::Arrow::move_arrow_start, [-1, 0] ], + 'arrow start up2' => [ '000-k', \&App::Asciio::Actions::Arrow::move_arrow_start, [ 0, -1] ], + 'arrow start down2' => [ '000-j', \&App::Asciio::Actions::Arrow::move_arrow_start, [ 0, 1] ], + 'arrow start right2' => [ '000-l', \&App::Asciio::Actions::Arrow::move_arrow_start, [ 1, 0] ], + 'arrow start left2' => [ '000-h', \&App::Asciio::Actions::Arrow::move_arrow_start, [-1, 0] ], + 'arrow end up' => [ '00S-Up', \&App::Asciio::Actions::Arrow::move_arrow_end, [ 0, -1] ], + 'arrow end down' => [ '00S-Down', \&App::Asciio::Actions::Arrow::move_arrow_end, [ 0, 1] ], + 'arrow end right' => [ '00S-Right', \&App::Asciio::Actions::Arrow::move_arrow_end, [ 1, 0] ], + 'arrow end left' => [ '00S-Left', \&App::Asciio::Actions::Arrow::move_arrow_end, [-1, 0] ], + 'arrow end up2' => [ '00S-K', \&App::Asciio::Actions::Arrow::move_arrow_end, [ 0, -1] ], + 'arrow end down2' => [ '00S-J', \&App::Asciio::Actions::Arrow::move_arrow_end, [ 0, 1] ], + 'arrow end right2' => [ '00S-L', \&App::Asciio::Actions::Arrow::move_arrow_end, [ 1, 0] ], + 'arrow end left2' => [ '00S-H', \&App::Asciio::Actions::Arrow::move_arrow_end, [-1, 0] ], }, + +'Asciio context_menu' => ['as_context_menu', undef, undef, \&App::Asciio::Actions::Asciio::context_menu ], +'Box context_menu' => ['bo_context_menu', undef, undef, \&App::Asciio::Actions::Box::context_menu ] , +'Multi_wirl context_menu' => ['mw_context_menu', undef, undef, \&App::Asciio::Actions::Multiwirl::multi_wirl_context_menu ], +'Angled arrow context_menu' => ['aa_ontext menu', undef, undef, \&App::Asciio::Actions::Multiwirl::angled_arrow_context_menu ], +'Ruler context_menu' => ['ru_context_menu', undef, undef, \&App::Asciio::Actions::Ruler::context_menu ], +'Shapes context_menu' => ['sh_context_menu', undef, undef, \&App::Asciio::Actions::Shapes::context_menu ], ) ; +register_first_level_group +( +SHORTCUT => '00S-question', + +'<< Insert leader >>' => 1, +'<< yank leader >>' => 1, +'<< paste leader >>' => 1, +'<< grouping leader >>' => 1, +'<< stripes leader >>' => 1, +'<< align leader >>' => 1, +'<< change color/font leader >>' => 1, +'<< arrow leader >>' => 1, +'<< debug leader >>' => 1, +'<< commands leader >>' => 1, +'<< Insert leader >>' => 1, +'<< slides leader >>' => 1, +'<< element leader >>' => 1, +'<< clone leader >>' => 1, +'<< git leader >>' => 1, +'<< move arrow ends leader >>' => 1, + +'Select next non arrow' => 1, +'Select previous non arrow' => 1, +'Select next arrow' => 1, +'Select previous arrow' => 1, +'Select all elements' => 1, +'Select connected elements' => 1, + +'Edit selected element inline' => 1, + +'Mouse quick link' => 1, +'Mouse duplicate elements' => 1, +'Mouse quick box' => 1, + +'Arrow to mouse' => 1, +'Arrow mouse change direction' => 1, +'Arrow change direction' => 1, +'Wirl arrow add section' => 1, +'Wirl arrow insert flex point' => 1, +) ; diff --git a/setup/asciio_object/basic.pl b/setup/asciio_object/basic.pl index 3b5335b6..e40a2129 100644 --- a/setup/asciio_object/basic.pl +++ b/setup/asciio_object/basic.pl @@ -14,6 +14,7 @@ GIT_MODE_CONNECTOR_CHAR_LIST => ['*', 'o', '+', 'x', 'X', '┼', '╋', '╬'], TAB_AS_SPACES => ' ', +USE_BINDINGS_COMPLETION => 0, DISPLAY_GRID => 1, DISPLAY_GRID2 => 1, @@ -63,6 +64,7 @@ extra_point => [0.27, 0.53, 0.27], mouse_rectangle => [0.90, 0.20, 0.20], + hint_background => [0.20, 0.20, 0.20], }, 'system' => { @@ -94,6 +96,7 @@ extra_point => [0.27, 0.53, 0.27], mouse_rectangle => [0.90, 0.20, 0.20], + hint_background => [0.20, 0.20, 0.20], } },