In html5 target ctrl-click is used to emulate right-mouse click. This prevents from using this combination for something else. For example multiselection is often done with ctrl-clicking.
Should this behavior be optional or even removed???
-
html5: ctrl-click generates right mouse click event??
I personally do not see why should we emulate Mac behavior on other systems.
What we should do is allow Mac users to use app and for that purpose we can allow Mac users use Cmd button instead of Ctrl. I mean Cmd-click should give exactly the same result as Ctrl-click. Not sure if it should be done by Kha or by App. -
html5: ctrl-click generates right mouse click event??
We did this to emulate Mac behavior on Mac systems, ctrl+click doesn't work in browsers on Mac - or at least didn't work in some browsers. Kind of a weird situation, guess we should just kick the code out, there's probably no way to make everyone happy by doing things like that.
-
html5: ctrl-click generates right mouse click event??
@Robert Sorry for reviving an old topic, but is there any news on that? I need a way to assign this key combination to some action and I don't find a way around it.
Is this issue still relevant in current browsers? If not, what about rerouting the command key (I can't find a keycode for this, so it seems unused to me) on mac keyboards to the control key event? This way, mac users could still use ctrl + left click without affecting windows users and without affecting already existing programs.
| last edited by timodriaan Reputation: 0 | Posts: 12 -
html5: ctrl-click generates right mouse click event??
Yes thats true, maybe it's just my bad english thats misleading here, so I try to explain it again.
Lets say (and this only works if there is no keycode assigned for the command key on macs in Kha! I can't find one or is it the meta key?) we reroute all button presses on the command key to the control key.
So, every time a mac user holds down the command key, the control key event is fired instead. This way, mac users would be able to still use ctrl + click to simulate a left click (with the native mac os implementation, not the soon-to-be-removed html5 implementation we're talking about) but would also be able to use ctrl + [someKey] commands through using the command key as a replacement for the control key and the control key has no further functions. For Windows & Linux users, nothing would change as the control key still remains the control key.
I hope this is a better explanation. But as I mentioned before, this is possibly very naive. And again, if the command key has a keycode assigned in Kha, this isn't working as programs could implement both cmd and ctrl shortcuts. If the keycode for cmd exists, just forget about this idea.
Anyway, maybe it's just the best to let program owners decide about how they wan't to implement shortcuts for mac and windows. It is probably not a good style to take away decisions from programmers on how to design their software.
| last edited by timodriaan Reputation: 0 | Posts: 12 -
html5: ctrl-click generates right mouse click event??
goto previous answer;
This was not just implemented to provide right click functionality, this was implemented to provide right click functionality exactly like Mac users are used to use it. No intentions of implementing any kind of extra special "only in Kha" keyboard shortcuts which then would have to be explained to users in every single application. -
html5: ctrl-click generates right mouse click event??
We're probably still talking past each other - but nevermind. Its not that important. I just thought about a (maybe possible) way to ensure that Mac users still can use right click (exactly like Mac users are used to use it, as you said) without "special functionality". Everything would work like before. Command key shortcuts would still work as command key shortcuts, but under the hood they would be treated differently. However (as mentioned before), it would only work under the condition that there currently is no KeyCode for the command key - which I don't know, I can't find it and can't test it mysef.
But forget about it, I opened a PR to remove the ctrl+right click code. Thank you very much