gmamaladze / globalmousekeyhook

This library allows you to tap keyboard and mouse, detect and record their activity even when an application is inactive and runs in background.
MIT License
1.05k stars 257 forks source link

Update FromString to allow for raw characters #112

Closed ChernayaKoshka closed 1 year ago

ChernayaKoshka commented 5 years ago

This pull request allows key combinations / sequences to be defined using raw characters, not just C# Enum names. An example of the change:

Combination.FromString(@"A+Oemtilde") can now be Combination.FromString(@"A+`")

In addition, the conversions have been made case-insensitive, so Combination.FromString(@"A+Oemtilde") can now be Combination.FromString(@"a+OeMtIlDe")

Currently, something like Combination.FromString(@"A++") is not supported, however. The + will still need to be OemPlus.

Finally, the C# version has been updated to be C# 7.0.

Please let me know if you have any questions / suggestions.