diff --git a/RegEx/Keyboard/Shortcut.regex.txt b/RegEx/Keyboard/Shortcut.regex.txt index 80a47f6..3cc7041 100644 --- a/RegEx/Keyboard/Shortcut.regex.txt +++ b/RegEx/Keyboard/Shortcut.regex.txt @@ -1,11 +1,18 @@ -# Matches Keyboard Shortcuts +# Matches Keyboard Shortcuts # Keyboard Shortcuts are a followed by a Key -(?(?>(?Option|Alt|LeftAltPressed|RightAltPressed|LeftAlt|RightAlt) # An modifier -|(?Control|Ctrl|LeftCtrlPressed|LeftCtrl|RightCtrlPressd|RightCtrl) # A Modifier -|(?EnhancedKey|Command|Cmd|LeftCmd|RightCmd|Windows|Win|Apple|OpenApple) # A Modifier (the Windows or Apple key) -|(?ShiftPressed|Shift|LeftShift|RightShift) # A Modifier -)\+){0,3} # 0-3 modifiers are followed by a key. The Key can be -(?>(?.$) # A single-character key -|(?\{[^\}]+\}{1,2}) # A virtual key (enclosed in {}s) -|(?[^\,]+) # A key name +(?(?> + (?Option|Alt|LeftAltPressed|RightAltPressed|LeftAlt|RightAlt) # An modifier + | + (?Control|Ctrl|LeftCtrlPressed|LeftCtrl|RightCtrlPressd|RightCtrl) # A Modifier + | + (?EnhancedKey|Command|Cmd|LeftCmd|RightCmd|Windows|Win|Apple|OpenApple) # A Modifier (the Windows or Apple key) + | + (?ShiftPressed|Shift|LeftShift|RightShift) # A Modifier +)\+){0,3} # 0-3 modifiers are followed by a key. The Key can be +(?> + (?.$) # A single-character key + | + (?\{[^\}]+\}{1,2}) # A virtual key (enclosed in {}s) + | + (?[^\,]+) # A key name )