… | |
… | |
1966 | ++$self->{cursor} if $self->{cursor} < length $self->{text}; |
1966 | ++$self->{cursor} if $self->{cursor} < length $self->{text}; |
1967 | } elsif ($sym == CFPlus::SDLK_HOME) { |
1967 | } elsif ($sym == CFPlus::SDLK_HOME) { |
1968 | $self->{cursor} = 0; |
1968 | $self->{cursor} = 0; |
1969 | } elsif ($sym == CFPlus::SDLK_END) { |
1969 | } elsif ($sym == CFPlus::SDLK_END) { |
1970 | $self->{cursor} = length $text; |
1970 | $self->{cursor} = length $text; |
|
|
1971 | } elsif ($uni == 21) { # ctrl-u |
|
|
1972 | $text = ""; |
1971 | } elsif ($uni == 27) { |
1973 | } elsif ($uni == 27) { |
1972 | $self->emit ('escape'); |
1974 | $self->emit ('escape'); |
1973 | } elsif ($uni) { |
1975 | } elsif ($uni) { |
1974 | substr $text, $self->{cursor}++, 0, chr $uni; |
1976 | substr $text, $self->{cursor}++, 0, chr $uni; |
1975 | } else { |
1977 | } else { |