aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lib/Test/Irssi/Misc.pm
blob: a6339e094a020b21ad5ba95382c5f3043eff3072 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package Test::Irssi::Misc;
use strictures 1;



sub keycombo_to_code {
    my ($key_combo) = @_;
    my $output = '';
    my $ctrl = 0;
    my $meta = 0;
    if ($key_combo =~ m/[cC](?:trl)?-(.+)/) {
        $ctrl = 1;
        _parse_rest($1);
    }
    if ($key_combo =~ m/[Mm](?:eta)?-(.+)/) {
        $meta = 1;
        _parse_rest($1);
    }
}

sub _parse_key {
    my ($rest) = @_;
    my $special = {
                   left => '',
                   right => '',
                   up => '',
                   down => '',
                   tab => '',
                   space => '',
                   spc => '',
                  };
}


1;