![]() |
#76 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 846
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
|
It works. I am leaving for the weekend.
|
![]() |
![]() |
![]() |
#77 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,630
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Great, Thanks!
|
![]() |
![]() |
![]() |
#78 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,816
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Where should we squeeze in a Windows specific check box for:
* enable AltGr on international keyboard in the Sigil Preferences? I think we now have a couple of Windows specific settings, don't we? Perhaps a Windows specific tab that is only added on Windows builds might make sense? We ifdef inserting the tab not each settings themselves. Might be worth thinking about. How do international keyboards users on Linux deal with altgr? Should we be adding in Linux? Last edited by KevinH; 09-14-2021 at 01:56 PM. |
![]() |
![]() |
![]() |
#79 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,630
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I don't know that there's a similar QPA platform plugin parameter for Linux, to be perfectly honest. I've never seen one.
I think I'd like to get the SettingsStore prefs for the windows altgr parameter coded and try to get some more Windows international keyboard users testing it (they can manually change the default false to true in the Sigil INI), before getting down to the GUI nitty-gritty (though the idea of a Windows-only Prefs tab does sound like a good idea to me). Whatever we do, though, it's definitely going to need restart of Sigil to take effect after changing the setting, though. I just want to make absolutely sure this thing is working the way it's expected. I set up a few international keyboard profiles on a Windows VM and I can't get the Sigil shortcuts created with the right Alt key to function correctly, myself (after they've been created). But then I don't have a physical AltGr key on my keyboard either. Perhaps that's a requirement for this to be relevant? |
![]() |
![]() |
![]() |
#80 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,735
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Let's wait for feedback from BeckyEbook and RbnJrg . |
|
![]() |
![]() |
![]() |
#81 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 846
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
|
I also see a checkbox in the Keyboard Shortcuts tab.
To this add a simple condition that the checkbox is displayed only on Windows. Code:
#if !defined(Q_OS_WIN32) ui.EnableAltGr->setVisible(false); #endif |
![]() |
![]() |
![]() |
#82 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,816
Karma: 6000000
Join Date: Nov 2009
Device: many
|
@BeckyEbook, that would work too. Is that just a mockup or have you already added support for it to your own builds? If the latter a diff or a pull request might help.
|
![]() |
![]() |
![]() |
#83 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,816
Karma: 6000000
Join Date: Nov 2009
Device: many
|
From reading the Qt windows platform code, it looks like a left Ctrl and right Alt should be detected as an AltGr if no altgr key exists. Of course, I have not tried that at all!
Quote:
|
|
![]() |
![]() |
![]() |
#84 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 846
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
|
Quote:
Imagine you have the shortcut AltGr+4=€ I can also get it by pressing Ctrl+left Alt+4. But ... in Sigil, adding an environment variable or parameter -platform windows:altgr makes us sort of separate these two things from each other and thus: AltGr works normally and is used to obtain additional characters (usually diacritics), and all shortcuts from Ctrl+left Alt can be used for keyboard shortcuts. I didn't add the code, I just added a checkbox to the src\Form_Files\PKeyboardShortcutsWidget.ui file (as demo mockup). Changed fragment: Spoiler:
EDIT: I already have a working code. Last edited by BeckyEbook; 09-14-2021 at 05:51 PM. |
|
![]() |
![]() |
![]() |
#85 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 846
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
|
Diffs.
|
![]() |
![]() |
![]() |
#86 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,816
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Hi BeckyEbook,
Those patches look good to me! I think we still have to add in something to make the "you need to restart for these changes to take effect" part work. I will apply them to my local tree and make sure they build on macOS. If so, assuming DiapDealer is okay as well, we can push them to master and create a deploy build for other Windows with international keyboards to test with. BTW, does making this change mean we can close this issue: https://github.com/Sigil-Ebook/Sigil/issues/580 since the default shortcuts should work if that box is checked. Or am I misunderstanding? Edit .... after rereading that issue 580 again, I think there is still a need for default sigil ini file just for international users, right? Last edited by KevinH; 09-14-2021 at 07:13 PM. |
![]() |
![]() |
![]() |
#87 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,630
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'll take a look, but I'm sure @Becky's code is fine. And I'll be tickled pink if I don't have to work on coding any UI stuff.
![]() I agree that we need to mention the required restart, though. |
![]() |
![]() |
![]() |
#88 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,816
Karma: 6000000
Join Date: Nov 2009
Device: many
|
I think we just need to properly set this flag in the results from KeyboardShortcutsWidget
PreferencesWidget::ResultAction_RestartSigil So we record the value of that checkbox on entry and on exit we compare the current value to its initial value and if different we set this flag in the widget results. That should cause the alert about restarting to be generated. |
![]() |
![]() |
![]() |
#89 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,630
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Oh, that's right. I forgot we had the builtin warning we could just trigger with results flags.
![]() |
![]() |
![]() |
![]() |
#90 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 846
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
|
Yes. The best solution is to use an existing function to indicate that a restart is required.
Add to KeyboardShortcutsWidget.h Code:
bool m_EnableAltGr; Code:
m_EnableAltGr = ui.EnableAltGr->isChecked(); Code:
if (m_EnableAltGr != ui.EnableAltGr->isChecked()) { results = results | PreferencesWidget::ResultAction_RestartSigil; } The enabled checkbox should fix issue 580 [partially]. Quote:
Last edited by BeckyEbook; 09-14-2021 at 07:49 PM. Reason: Info about issue 580. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[BUG] - M96 out of memory - [BUG] | Alf77 | Onyx Boox | 5 | 02-05-2015 11:47 AM |
Another bug that I wonder if others have seen | PeterT | Kobo Reader | 16 | 06-08-2013 09:48 PM |
DR800 Help, I've got a bug!! A bug on my screen!! | Franky | iRex | 4 | 06-21-2011 11:45 AM |
Embedded font bug or CSS bug in ADE | JSWolf | ePub | 10 | 06-11-2011 02:34 PM |
PRS-505 bug or eBookLib bug? | porkupan | Sony Reader | 3 | 10-07-2007 10:44 PM |