Closed uhfath closed 7 months ago
@uhfath Thank you for your great contributions! The ToKeys
method is a nice idea that I could not come up with. Many developers will be saved this new capability of the Blazor HotKeys.
By the way, the name of this method, ToKeys
, makes me feel it will return something different from the array of string
. I feel like it will return some kind of object representing the concept of "key". So, do you mind if I would like to change the name of this method from ToKeys
to ToKeyStrings
? Please tell me what you think about this suggestion.
@jsakamoto thanks for taking the time. Good idea regarding renaming the method.
Another idea is perhaps something like ToStringKeys
as analogue to ToString
which returns keys.
In this case when used with intelli-sense while typing the code both of them would show up near to each other.
@uhfath Thank you for the reply. So, I renamed the method name from ToKeys
to ToStringKeys
and published it as a new version, v.3.2.1.
Thank you for your contribution!
Happy to help. Your project is very helpful.
Added a helper method
HotKeyEntry
.ToKeys
to return array of formatted keys like inToString
. This is useful if one want's to display something like this:Ctrl
+Shift
+A
Note that each element can be a separate HTML tag (like<span>
or anything else). UsingToString
would require extracting text manually.Also added a simple test for new method and retained backward compatibility for
ToString
(it usesToKeys
now).