aboutsummaryrefslogtreecommitdiff
path: root/emojitrans2.pl
diff options
context:
space:
mode:
Diffstat (limited to 'emojitrans2.pl')
-rwxr-xr-xemojitrans2.pl10
1 files changed, 9 insertions, 1 deletions
diff --git a/emojitrans2.pl b/emojitrans2.pl
index 420129f..4f70288 100755
--- a/emojitrans2.pl
+++ b/emojitrans2.pl
@@ -50,8 +50,16 @@ BEGIN { binmode(STDOUT, ":utf8");
'↵' => 'Return',
'∇' => 'Delete', # Del, get it?
'˅' => 'Insert', # it'll do.
+ '˃' => 'Control_R',
+ '˂' => 'Control_L',
+ # Function-keys? ¹ ²..ˣ ᵉ ᵗ?
);
+ $specials = join "", keys %specials;
+ # Because of reasons
+ $specials =~ s/[]\\-]/\\$&/g;
+ $RE = qr{([[:alnum:]$specials]+)};
+
sub splitup {
my $arg=shift;
local $_;
@@ -73,7 +81,7 @@ unless (/^#/) {
my $hold=$_;
s/<M_>/<Multi_key>/;
s/<MM>/<Multi_key> <Multi_key>/;
- s({([][[:alnum:] _+:;%@>=`<,.^\$+#()?&!/|'"\\~*{}♫-]+)})(splitup($1))e;
+ s({($RE)})(splitup($1))e;
if (length($1) > 7) {
$_=$hold;
s/^<M([M_])>/### <M$1>/;