--- deliantra/Deliantra-Client/DC/Macro.pm 2007/08/28 01:23:47 1.9 +++ deliantra/Deliantra-Client/DC/Macro.pm 2007/10/14 20:08:26 1.14 @@ -8,7 +8,7 @@ our $REFRESH_MACRO_LIST; our %DEFAULT_KEYMAP = ( - (map +($_ => "!completer $_"), "a" .. "z"), + (map +("($_)" => "!completer $_"), "a" .. "z"), "(!)" => "!completer shout ", "(\")" => "!completer say ", "(')" => "!completer", @@ -24,13 +24,19 @@ "f9" => "!toggle-setup", (map +("LAlt-$_" => "!switch-tab $_"), 0..9), (map +("RAlt-$_" => "!switch-tab $_"), 0..9), + "LAlt-x" => "!close-current-tab", "return" => "!activate-chat", "." => "!repeat-command", "," => "take", "space" => "apply", + "enter" => "examine", "[+]" => "rotateshoottype +", "[-]" => "rotateshoottype -", + "LAlt-e" => "examine", + "LAlt-s" => "ready_skill find traps", + "LAlt-d" => "ready_skill disarm traps", + "LAlt-p" => "ready_skill praying", ); # allowed modifiers @@ -85,6 +91,7 @@ "toggle-setup" => sub { $::SETUP_DIALOG->toggle_visibility }, "toggle-setup" => sub { $::SETUP_DIALOG->toggle_visibility }, "switch-tab" => sub { $::MESSAGE_WINDOW->user_switch_to_page (0 + shift) }, + "close-current-tab" => sub { $::MESSAGE_WINDOW->close_current_tab }, "activate-chat" => sub { $::MESSAGE_WINDOW->activate_current }, "repeat-command" => sub { $::CONN->user_send ($::COMPLETER->{last_command}) @@ -242,10 +249,6 @@ sub find_default($) { my ($ev) = @_; - if (my $cmd = $DEFAULT_KEYMAP->{U}{$ev->{unicode}}) { - return $cmd; - } - for my $m (reverse grep $_, @{ $DEFAULT_KEYMAP->{K} }) { for (keys %$m) { if ($_ == ($ev->{mod} & $_)) { @@ -256,6 +259,10 @@ } } + if (my $cmd = $DEFAULT_KEYMAP->{U}{$ev->{unicode}}) { + return $cmd; + } + () }