… | |
… | |
1094 | ++$self->{cursor} if $self->{cursor} < length $self->{text}; |
1094 | ++$self->{cursor} if $self->{cursor} < length $self->{text}; |
1095 | } elsif ($sym == SDLK_HOME) { |
1095 | } elsif ($sym == SDLK_HOME) { |
1096 | $self->{cursor} = 0; |
1096 | $self->{cursor} = 0; |
1097 | } elsif ($sym == SDLK_END) { |
1097 | } elsif ($sym == SDLK_END) { |
1098 | $self->{cursor} = length $text; |
1098 | $self->{cursor} = length $text; |
|
|
1099 | } elsif ($sym == SDLK_ESCAPE) { |
|
|
1100 | $self->emit ('escape'); |
1099 | } elsif ($uni) { |
1101 | } elsif ($uni) { |
1100 | substr $text, $self->{cursor}++, 0, chr $uni; |
1102 | substr $text, $self->{cursor}++, 0, chr $uni; |
1101 | } |
1103 | } |
1102 | |
1104 | |
1103 | $self->_set_text ($text); |
1105 | $self->_set_text ($text); |
… | |
… | |
1650 | |
1652 | |
1651 | if ($sym == SDLK_KP5) { |
1653 | if ($sym == SDLK_KP5) { |
1652 | $::CONN->user_send ("command stay fire"); |
1654 | $::CONN->user_send ("command stay fire"); |
1653 | } elsif ($sym == SDLK_a) { |
1655 | } elsif ($sym == SDLK_a) { |
1654 | $::CONN->user_send ("command apply"); |
1656 | $::CONN->user_send ("command apply"); |
|
|
1657 | } elsif ($sym == SDLK_QUOTE) { |
|
|
1658 | $self->emit ('activate_console'); |
1655 | } elsif (exists $DIR{$sym}) { |
1659 | } elsif (exists $DIR{$sym}) { |
1656 | if ($mod & KMOD_SHIFT) { |
1660 | if ($mod & KMOD_SHIFT) { |
1657 | $self->{shft}++; |
1661 | $self->{shft}++; |
1658 | $::CONN->user_send ("command fire $DIR{$sym}[0]"); |
1662 | $::CONN->user_send ("command fire $DIR{$sym}[0]"); |
1659 | } elsif ($mod & KMOD_CTRL) { |
1663 | } elsif ($mod & KMOD_CTRL) { |