Skip to content

Commit

Permalink
fixed and cleaned up a bit exiting the completion mode
Browse files Browse the repository at this point in the history
Fixes #11

Ctrl/Alt+something may be used to exit the completion mode again.
  • Loading branch information
vifon committed May 18, 2015
1 parent a934e29 commit 6ce779b
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions autocomplete-ALL-the-things
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,8 @@ sub conditional_leave {
my ($self, $event, $keysym) = @_;

my $keyname = $self->XKeysymToString($keysym);
# if ASCII, ignore ctrl etc.
if ($event->{'state'} < 2 &&
($keysym <= 127 ||
$keyname eq "Return" ||
$keyname eq "BackSpace" ||
$keyname eq "Delete" ||
$keyname eq "Tab" ||
$keyname eq "Up" ||
$keyname eq "Down" ||
$keyname eq "Left" ||
$keyname eq "Right")) {

$_ = $keyname;
unless (/Shift/ || /Control/ || /Alt/ || /Super/) {
leave($self);
$self->disable("key_press");
}
Expand Down

0 comments on commit 6ce779b

Please sign in to comment.