diff options
author | dakkar <dakkar@thenautilus.net> | 2011-07-10 13:41:39 +0100 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2011-07-10 13:41:39 +0100 |
commit | bf222c8ad51f344569dabbae1c7f62246f23e801 (patch) | |
tree | fdab95b68b6443320ede11f2ce43dc4934efc793 /do-ctrl.pl | |
download | tf101-dvorak-keyboard-bf222c8ad51f344569dabbae1c7f62246f23e801.tar.gz tf101-dvorak-keyboard-bf222c8ad51f344569dabbae1c7f62246f23e801.tar.bz2 tf101-dvorak-keyboard-bf222c8ad51f344569dabbae1c7f62246f23e801.zip |
some tools
Diffstat (limited to 'do-ctrl.pl')
-rw-r--r-- | do-ctrl.pl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/do-ctrl.pl b/do-ctrl.pl new file mode 100644 index 0000000..8f3d92c --- /dev/null +++ b/do-ctrl.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl +use strict; +use warnings; +use 5.012; +use File::Slurp 'edit_file'; + +edit_file { + s{ +(?<pre> key \s+ (?<key> [A-Z] ) \s+ \{ +.*?) +^\s+ alt,\ ctrl,\ meta:\s+none$ +(?<post> .*? \}) +}{ +"$+{pre} ctrl: '\\x".sprintf('%02x',ord($+{key})-ord('@'))."' + alt, meta: none$+{post}" +}smxge; +} shift; |