![]() ![]() I've been adding some unit tests on a branch which help illustrate the difference. ![]() I could foresee user-facing options for whether to prefer characters or charactersIgnoringModifiers, but it's more subtle and surprising than one might guess. I attempted to explain this in a previous comment. Referring back to the original post, ⇧7 is not really a "shortcut", it is a keystroke which results in & being inputted via a keyboard event. It's only when control, option, or command are added to the keystroke that it's seen as a command key event with both the shifted and unshifted key provided in the event information. That's literally how it is represented in the internal CGEvent/NSEvent generated for each keystroke. So, ⇧7 is technically just & on a US keyboard layout. We'd welcome any help or feedback from folks with locale and keyboard layout expertise on this one, but I doubt the raw shift-7 case is one we'd be able to support, at least not without a ton of special casing. And the layout of modified keys also differs across locales & keyboard layouts in ways we can't entirely predict. In other words, the shift key is accounted for differently depending on whether other modifiers are used. What's interesting is that for cmd-shift-7 we receive 7 for characters and & for charactersIgnoringModifiers. In your specific case, for shift-7, what comes through the event is literally & for both the event's characters and charactersIgnoringModifiers properties. Unfortunately there are some limitations of what's possible here, I recall from having investigated quite some time ago. ![]() ultimately we should consolidate and continue the conversation is right, time to devote to this has been very limited lately, but this is one I have been looking into. If you are sure that you want your text in certain format, you can then always search for its command in Command Palette.Ĭheck the project link for more information and demo.What you're referring to is more or less the same as what was brought up in. You can modify the list of the cases which will be a part of cycle from extension settings. So you can stop once you get the required case. This plugin works on single command, which by default is assigned to Cmd + M / Ctrl + M, pressing which cycles through all the cases. So understanding which command to use is really tough. It most certainly is hard to remember all the shortcuts so not a good idea.Īnd the most important one, mostly I am not able to recall the name of the case I want my text to be in but I know the representation. If you plan to assign a Key-binding to a command, you will need 10-12 keybindings to cover all the cases. Hard to type so much text and hard to remember the commands They work on entering long commands to the Command Palette in VS Code. There are a couple of extensions out there formatting the text in different cases but I find them difficult to use, the reasons are: I developed this extension keeping the usability in mind. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |