--- deliantra/Deliantra-Client/DC/Macro.pm 2007/09/02 03:55:03 1.10 +++ deliantra/Deliantra-Client/DC/Macro.pm 2007/09/09 17:47:00 1.13 @@ -24,11 +24,13 @@ "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-s" => "ready_skill find traps", @@ -88,6 +90,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}) @@ -245,10 +248,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} & $_)) { @@ -259,6 +258,10 @@ } } + if (my $cmd = $DEFAULT_KEYMAP->{U}{$ev->{unicode}}) { + return $cmd; + } + () }