… | |
… | |
205 | my ($mod, $sym, $cmds) = @_; |
205 | my ($mod, $sym, $cmds) = @_; |
206 | $::BIND_EDITOR->cfg_bind ($mod, $sym, $cmds); |
206 | $::BIND_EDITOR->cfg_bind ($mod, $sym, $cmds); |
207 | }); |
207 | }); |
208 | $::BIND_EDITOR->start; |
208 | $::BIND_EDITOR->start; |
209 | $::BIND_EDITOR->show; |
209 | $::BIND_EDITOR->show; |
|
|
210 | #TODO: elmex, what was this supposed to do? it currently crashes the client. |
210 | } elsif ($sym == CFPlus::SDLK_INSERT && not ($mod & CFPlus::KMOD_CTRL)) { |
211 | # } elsif ($sym == CFPlus::SDLK_INSERT && not ($mod & CFPlus::KMOD_CTRL)) { |
211 | $::BIND_EDITOR->stop; |
212 | # $::BIND_EDITOR->stop; |
212 | $::BIND_EDITOR->ask_for_bind_and_commit; |
213 | # $::BIND_EDITOR->ask_for_bind_and_commit; |
213 | $::BIND_EDITOR->hide; |
214 | # $::BIND_EDITOR->hide; |
214 | } elsif (!$::CONN) { |
215 | } elsif (!$::CONN) { |
215 | return 0; # bindings further down need a valid connection |
216 | return 0; # bindings further down need a valid connection |
216 | |
217 | |
217 | } elsif ($sym == CFPlus::SDLK_KP5 && !$mod) { |
218 | } elsif ($sym == CFPlus::SDLK_KP5 && !$mod) { |
218 | $::CONN->user_send ("stay fire"); |
219 | $::CONN->user_send ("stay fire"); |
219 | } elsif ($uni == ord ",") { |
220 | } elsif ($uni == ord ",") { |
220 | $::CONN->user_send ("take"); |
221 | $::CONN->user_send ("take"); |
221 | } elsif ($uni == ord " ") { |
222 | } elsif ($uni == ord " ") { |
222 | $::CONN->user_send ("apply"); |
223 | $::CONN->user_send ("apply"); |
|
|
224 | } elsif ($uni == 13) { |
|
|
225 | $::CONN->user_send ("examine"); |
223 | } elsif ($uni == ord ".") { |
226 | } elsif ($uni == ord ".") { |
224 | $::CONN->user_send ($self->{completer}{last_command}) |
227 | $::CONN->user_send ($self->{completer}{last_command}) |
225 | if exists $self->{completer}{last_command}; |
228 | if exists $self->{completer}{last_command}; |
226 | } elsif (my $bind_cmd = $::CFG->{profile}{default}{bindings}{$mod}{$sym}) { |
229 | } elsif (my $bind_cmd = $::CFG->{profile}{default}{bindings}{$mod}{$sym}) { |
227 | $::CONN->user_send ($_) for @$bind_cmd; |
230 | $::CONN->user_send ($_) for @$bind_cmd; |