Bug 100908 - Typing with Ctrl+Alt+? for ALTGR toggle does not work
Summary: Typing with Ctrl+Alt+? for ALTGR toggle does not work
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.0.0
Keywords: bibisected, bisected, regression
: 105990 113741 118400 (view as bug list)
Depends on:
Blocks: Shortcuts-AltGR
  Show dependency treegraph
 
Reported: 2016-07-14 10:56 UTC by Bjorn Muller
Modified: 2018-06-26 19:22 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bjorn Muller 2016-07-14 10:56:05 UTC
I have a US English keyboard that does not have the AltGr key, there is just one Alt key. Since I normally type in Swedish, I use a Swedish keyboard layout. To type some special characters I have to use Ctrl+Alt+? instead of AltGr+?. This works fine for all Windows programs I have tried, including all LibreOffice applications - EXCEPT WRITER (which - of course - is the one I use most). Typing Ctrl+Alt+? in Writer normally results in nothing, except Ctrl+Alt+E invokes the Edit menu.

I am aware of some of the issues with Ctrl-Alt+ that have been discussed in earlier bug reports. But I can not see why Ctrl+Alt+? should work in all other LibreOffice programs, but not in Writer.

A general comment on keyboard shortcuts. I have noticed that some people are annoyed over conflicts between Windows keyboard shortcuts and the LibreOffice ones. Since there is an option to change keyboard shortcuts, why not add another option - to use Windows standard as alternative to a LibreOffice alternative. Let the user decide what suits him best.
Comment 1 V Stuart Foote 2016-07-14 13:38:01 UTC
> 
> A general comment on keyboard shortcuts. I have noticed that some people are
> annoyed over conflicts between Windows keyboard shortcuts and the
> LibreOffice ones. Since there is an option to change keyboard shortcuts, why
> not add another option - to use Windows standard as alternative to a
> LibreOffice alternative. Let the user decide what suits him best.

What Windows standard? Many of our issues with accelerators and shortcuts come from Microsoft's moving target. And of course OS localization issues as here. And in any case we would still have to handle the keycodes internal to LibreOffice for either user choice.
Comment 2 Bjorn Muller 2016-07-14 18:56:53 UTC
(In reply to V Stuart Foote from comment #1)
> > 
> > A general comment on keyboard shortcuts. I have noticed that some people are
> > annoyed over conflicts between Windows keyboard shortcuts and the
> > LibreOffice ones. Since there is an option to change keyboard shortcuts, why
> > not add another option - to use Windows standard as alternative to a
> > LibreOffice alternative. Let the user decide what suits him best.
> 
> What Windows standard? Many of our issues with accelerators and shortcuts
> come from Microsoft's moving target. And of course OS localization issues as
> here. And in any case we would still have to handle the keycodes internal to
> LibreOffice for either user choice.

I am just a common user and not familiar with the details of what you refer to. While looking for solutions to my problem, I noticed
1. that a number of Writer shortcuts are preaassigned to certain key combinations, 2. that many key combinations don´t have any preassigned shortcuts and 3. that in any case you can freely assign other functions to any key combination, but then you only have a choice of prelisted Writer functions.
My point is, that if e.g. Ctrl+Alt+2 produces a @ character on my Swedish keyboard layout (which is what Windows normally does), then why shouldn´t I be able to choose to have the @ typed in my Writer document, even if it cannot be ruled out, that another user in another environment, who would choose to do the same, might find that Windows produces a different, more troublesome result? That is the beauty of free choice, none else needs to follow, if the result is bad for him.

However, this is just a side line. My main point is still why typing with Ctrl+Alt+? doesn´t work in Writer when it does work with all other LibreOffice applications.
Comment 3 Aron Budea 2016-07-14 20:24:45 UTC
(In reply to V Stuart Foote from comment #1)
> What Windows standard? Many of our issues with accelerators and shortcuts
> come from Microsoft's moving target. And of course OS localization issues as
> here. And in any case we would still have to handle the keycodes internal to
> LibreOffice for either user choice.

In Windows Ctrl+Alt combination is an alternative to AltGr key. A lot of similar issues seem to be caused by the workarounds to make Ctrl+Alt shortcut modifier work, and behave the same regardless whether there's right Alt or AltGr.

https://en.wikipedia.org/wiki/AltGr_key#Control_.2B_Alt_as_a_substitute
https://blogs.msdn.microsoft.com/oldnewthing/20040329-00/?p=40003
Comment 4 V Stuart Foote 2016-07-14 21:26:59 UTC
(In reply to Aron Budea from comment #3)

> In Windows Ctrl+Alt combination is an alternative to AltGr key. A lot of
> similar issues seem to be caused by the workarounds to make Ctrl+Alt
> shortcut modifier work, and behave the same regardless whether there's right
> Alt or AltGr.
> 

Sure, but question might be if our LO logic assigning VK_RMENU as either KEYMOD_RMOD2 or MOD1+MOD2+? (using the LMOD2) is really functioning as the ALTGr on all keyboard mappings that use it--and is there a better way of controlling the behavior.

Sorry to say, I get lost trying to follow interplay of vcl/win/window/salframe.cxx, include/vcl/keycod.hxx, and the definition at http://opengrok.libreoffice.org/xref/core/include/vcl/keycodes.hxx#155 -- to my poor ability to follow along, it kind of seems like the definition for MODKEY_MOD2 might need the same test and split of KEYMOD_LMOD2 & KEYMOD_RMOD2 as VK_LMENU & VK_RMENU got for use as ALTGr for bug 95761.

Expect Jürgen, Justin and Caolán can sort this for more consistent behavior without much fuss, hope so.
Comment 5 Bjorn Muller 2016-07-15 08:33:03 UTC
I can´t follow this discussion, but it seems my bug report has at least initiated a discussion among you pros. At this point I wonder if I should throw my keyboard (with PC attached) away or is there a chance that the problem will be resolved anytime reasonably soon? Your best guess, without making promises, please!
Comment 6 Andreas 2016-09-21 17:46:41 UTC
I am able to confirm the bug. At least since LibreOffice 4.0.6.3, and now still in version 5.2.1.2 (like in version 5.1.2.2, 5.1.3.2, 5.1.4.2, 5.2.0.4) in Writer shortcuts with <Ctrl><Alt> (e. g. the "@" which is part of the "q" key on my german QWERTZ keyboard) don't work though they do when using <AltGr>. In Calc <Ctrl><Alt> works fine.
Comment 7 V Stuart Foote 2017-02-13 23:38:19 UTC
*** Bug 105990 has been marked as a duplicate of this bug. ***
Comment 8 Regina Henschel 2017-04-10 23:49:32 UTC
It is common to use Ctrl + Alt instead of AltGr. It has worked it Version: 5.0.0.0.alpha1+
Build ID: e9fbe1f7cd28de2a9da8089d89e903406165eb56
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-04-25_00:22:55
Locale: de_DE
Comment 9 Regina Henschel 2017-04-10 23:55:08 UTC
The changed behavior was introduced with the fix for bug 95761.
Comment 10 Andreas 2017-05-11 09:40:35 UTC
The issue her hasn't been solved yet.
Bug https://bugs.documentfoundation.org/show_bug.cgi?id=95761 addresses a different issue. By now (LibO 5.2.6.2) assignemts to <Ctrl><Alt> do work as far as the settings in the "Customise keyboard" dialog are concerned. But the standard Microsoft Windows assignments to <Ctrl><Alt> still don't work.

(Of course it is possible to create a work-around by writing a macro and assigning it to a specific key combination in the "Customise keyboard" dialog. But what about users who are not used to the macro writing functionality of LibO? And what about the look and feel of LibO with the standard Windows <Ctrl><Alt> behaviour not working in Writer?)

Please, don't forget this issue!
Comment 11 Aron Budea 2018-02-05 01:38:55 UTC
This issue was fixed in 6.0.0 by reverting the commit in bug 95761.
Comment 12 Aron Budea 2018-06-26 19:22:36 UTC
*** Bug 113741 has been marked as a duplicate of this bug. ***
Comment 13 Aron Budea 2018-06-26 19:22:56 UTC
*** Bug 118400 has been marked as a duplicate of this bug. ***