lib/fusuma/plugin/parsers/keypress_parser.rb in fusuma-plugin-keypress-0.8.0 vs lib/fusuma/plugin/parsers/keypress_parser.rb in fusuma-plugin-keypress-0.9.0

- old
+ new

@@ -17,12 +17,13 @@ # event4 KEYBOARD_KEY +4.90s KEY_LEFTSHIFT (42) released # event4 KEYBOARD_KEY +7.39s KEY_CAPSLOCK (58) pressed # event4 KEYBOARD_KEY +7.52s KEY_CAPSLOCK (58) released # event4 KEYBOARD_KEY +8.98s KEY_LEFTCTRL (29) pressed # event4 KEYBOARD_KEY +9.14s KEY_LEFTCTRL (29) released + # event4 KEYBOARD_KEY +29.581s KEY_2 (3) released case line - when /KEYBOARD_KEY.+(\d+\.\d+)s.*KEY_([A-Z]+).*(pressed|released)/ + when /KEYBOARD_KEY.+(\d+\.\d+)s.*KEY_([[:alnum:]_]+)\s.*(pressed|released)/ matched = Regexp.last_match # time = matched[1] # 4.81 code = matched[2] # LEFTSHIFT status = matched[3] # pressed