-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Difference in "force selection" modifier key across platforms #4329
Comments
@jerch yeah it might help there too. I can't remember the reason we made this decision originally but it might have meant to be: if (Browser.isMac && this._optionsService.rawOptions.macOptionClickForcesSelection) {
return event.altKey;
} We should dig through git history of xterm.js and vscode for clues. |
@Tyriar Just a vague guess only - imho we had several discussions in the past about typical key bindings on platforms (this dates way back, was it ~2016/17? - I dont remember), and iTerm was mostly brought up as reference for osx users and their expectations. on the broader level:
I agree, that would be the real fix for it, at least a major part of it (mouse side). The current situation is a bit unfortunate - we have several mouse handlers/listeners spread across the codebase, so this is def. a bigger rework. The situation gets further complicated by key handling here, which is a convoluted topic itself with partially quite hacky code (result of >>5ys of evolutionary code to cover most browsers/platforms). We had several attempts to clean this mess, but kinda always ended just fixing the old codebase, as the cleaner approaches always had unbearable flaws for this or that. Some ideas:
Imho thats possible, but I am not sure if we should introduce just another option for a certain action for osx users only. We already have several osx only options in settings, and tbh I hate them for cluttering the terminal settings. So I wonder if we should swallow the pill and get something like key/mouse profiles running from a unified input service. |
@Tyriar's change would indeed resolve my issue. Currently, force-selecting with shift is impossible on macOS. With that change, it becomes the default everywhere (even on macOS), and enabling the Looking at the description of the setting in VS Code, there's no suggestion that the code should've been one way or another:
I personally don't see any harm in making the change. People with |
I just encountered the inconsistency of the "force selection" modifier across Windows/Linux and macOS and personally found that a bit jarring:
xterm.js/src/browser/services/SelectionService.ts
Lines 429 to 435 in 0981ca8
I use VS Code on both Windows and macOS, and it would be nice if the modifier was the same across platforms. I couldn't find any technical reason this was done, so I'm guessing it was conventional. iTerm uses alt for this, and since iTerm has a majority "market share" on macOS terminals (at least in my experience working on macOS over the past few years), I'm assuming the modifier choice came from there.
Other cross-platform terminals seem to have settled on using shift as the modifier across the board, though:
I know that implementing #1536 would fix this, but that seems like a reasonably large endeavor. Is this something that could be resolved with a smaller change?
The text was updated successfully, but these errors were encountered: