> On 5 Jun 2024, at 19:27, lars.sonchocky-helld...@hamburg.de wrote:
> 
> Hi,
> 
>> Am 05.06.2024 um 18:33 schrieb Riccardo Mottola <riccardo.mott...@libero.it>:
>> 
>> Hi,
>> 
>> Riccardo Mottola wrote:
>>> what is the default mapping for Option and Command on GNUstep when running 
>>> on X11?
>> 
>> I reply to myself and try to stir up the discussion.
>> Standard we map both option and command to alt. This is quite convenient for 
>> menus shortcuts for example, but is not for mouse operations.
>> Also not all keyboards have extra keys, like the windows key to mimic 
>> command.
>> 
>> Let me exemplify.
>> 
>> Apple's spec say:
>> Control: Link
>> Option: Copy
>> Command: Generic
>> 
>> So if Option = Alt and Command = Alt, there is no way to distinguish Copy 
>> from Generic during drag operations.
>> 
>> GWorkspace contains a lot of "workaround" code to be able to Move and Copy.. 
>> essentially, Move operation is never explicitly gotten from the mask, but 
>> inferred if it is "not Copy"... and with some dirty tricks apparently it 
>> mostly worked, but not always. Who knows what other applications would do.
>> 
>> I think the code should be "right" and check for Move, Copy, Link... and 
>> whatever else and tricks should be somehow standard in gui
>> 
>> I am rewriting GWorkspace so that it works correctly, testing with having 3 
>> mapped modifiers. You can test & check in the drag_debug branch:
>> https://github.com/gnustep/apps-gworkspace/tree/drag_debug
>> 
>> 
>> I think we should have a more sensible setup in gui. Proposals to discuss 
>> would be:
>> 1) map to different keys, so to have 3 keys. E.g. Alt, Shift, Ctrl, or 
>> LeftAlt, RightAlt, Ctrl.... Most keyboards have two Alts, but not all (e.g. 
>> small laptops, MacBooks and PowerBooks)
>> 2) try to have a "modifier" for either option or command, e.g. Alt-Shift
>> 3) keep the defaults we have, but in case of drag operations prioritize Copy 
>> over Generic if the modifiers are the same
>> 
>> The changes should allow users with more keys to be able to fully map things.
>> 
>> Riccardo
>> 
> 
> I am not a Linux-User (so I don’t know the common use-patterns on Linux) but 
> I think, this should be configurable like it is on the Mac:
> 
> <PastedGraphic-1.png>

Yes, I'm sure SystemPreferences.app has a panel for mapping modifier keys.
I have a vague memory that there's documentation on how to do it with the 
defaults system too.
But I guess the point is to try to improve the baseline mapping 'out of the 
box' (I'm just not sure it's worth the effort of writing code to try to figure 
out the capabilities of the hardware you happen to be running on though).



Reply via email to