Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-11-2021, 02:56 AM   #76
BeckyEbook
Evangelist
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 466
Karma: 1497025
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
It works. I am leaving for the weekend.
BeckyEbook is offline   Reply With Quote
Old 09-11-2021, 04:27 AM   #77
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 24,556
Karma: 167414566
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Great, Thanks!
DiapDealer is offline   Reply With Quote
Old 09-14-2021, 01:53 PM   #78
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 5,772
Karma: 3571874
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.
KevinH is offline   Reply With Quote
Old 09-14-2021, 02:16 PM   #79
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 24,556
Karma: 167414566
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?
DiapDealer is offline   Reply With Quote
Old 09-14-2021, 02:21 PM   #80
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,257
Karma: 19618507
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
Where should we squeeze in a Windows specific check box for:

* enable AltGr on international keyboard

in the Sigil Preferences?
I'd add it under Preferences > Keyboard Shortcuts. However, Preferences > General Settings > Advanced would work, too.

Let's wait for feedback from BeckyEbook and RbnJrg .
Doitsu is offline   Reply With Quote
Old 09-14-2021, 03:13 PM   #81
BeckyEbook
Evangelist
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 466
Karma: 1497025
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
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
I checked on Linux Arch and there is no problem with AltGr.
Attached Thumbnails
Click image for larger version

Name:	sigil-preferences-shortcuts-altgr-checkbox.png
Views:	22
Size:	42.7 KB
ID:	189245  
BeckyEbook is offline   Reply With Quote
Old 09-14-2021, 04:02 PM   #82
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 5,772
Karma: 3571874
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.
KevinH is offline   Reply With Quote
Old 09-14-2021, 04:04 PM   #83
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 5,772
Karma: 3571874
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:
Originally Posted by DiapDealer View Post
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?
KevinH is offline   Reply With Quote
Old 09-14-2021, 04:43 PM   #84
BeckyEbook
Evangelist
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 466
Karma: 1497025
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
Quote:
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!
The real problem with AltGr is that it is treated as Ctrl+Alt.
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:
Code:
   <item>
    <layout class="QHBoxLayout">
     <item>
      <widget class="QPushButton" name="resetAllButton">
       <property name="toolTip">
        <string>Reset all to default</string>
       </property>
       <property name="text">
        <string>Reset All</string>
       </property>
      </widget>
     </item>
     <item>
      <spacer>
       <property name="orientation">
        <enum>Qt::Horizontal</enum>
       </property>
       <property name="sizeHint" stdset="0">
        <size>
         <width>40</width>
         <height>20</height>
        </size>
       </property>
      </spacer>
     </item>
     <item>
      <widget class="QCheckBox" name="EnableAltGr">
       <property name="text">
        <string>Enable AltGr on international keyboard</string>
       </property>
      </widget>
     </item>
    </layout>
   </item>



EDIT: I already have a working code.

Last edited by BeckyEbook; 09-14-2021 at 05:51 PM.
BeckyEbook is offline   Reply With Quote
Old 09-14-2021, 06:05 PM   #85
BeckyEbook
Evangelist
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 466
Karma: 1497025
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
Diffs.
Attached Files
File Type: txt patch2.txt (516 Bytes, 14 views)
File Type: txt patch1.txt (1.0 KB, 17 views)
File Type: txt patch3.txt (1.4 KB, 14 views)
File Type: txt patch4.txt (559 Bytes, 17 views)
BeckyEbook is offline   Reply With Quote
Old 09-14-2021, 07:01 PM   #86
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 5,772
Karma: 3571874
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?


Quote:
Originally Posted by BeckyEbook View Post
Diffs.

Last edited by KevinH; 09-14-2021 at 07:13 PM.
KevinH is offline   Reply With Quote
Old 09-14-2021, 07:23 PM   #87
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 24,556
Karma: 167414566
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.
DiapDealer is offline   Reply With Quote
Old 09-14-2021, 07:30 PM   #88
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 5,772
Karma: 3571874
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.
KevinH is offline   Reply With Quote
Old 09-14-2021, 07:37 PM   #89
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 24,556
Karma: 167414566
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.
DiapDealer is offline   Reply With Quote
Old 09-14-2021, 07:39 PM   #90
BeckyEbook
Evangelist
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 466
Karma: 1497025
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
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;
Add to void KeyboardShortcutsWidget::readSettings()
Code:
m_EnableAltGr = ui.EnableAltGr->isChecked();
PreferencesWidget::ResultActions KeyboardShortcutsWidget::saveSettings()
Code:
    if (m_EnableAltGr != ui.EnableAltGr->isChecked()) {
        results = results | PreferencesWidget::ResultAction_RestartSigil;
    }

The enabled checkbox should fix issue 580 [partially].
Quote:
I think there is still a need for default sigil ini file just for international users, right?
Indeed, the OP is using mac on this issue and would like to remove/modify potentially conflicting shortcuts altogether.

Last edited by BeckyEbook; 09-14-2021 at 07:49 PM. Reason: Info about issue 580.
BeckyEbook is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 09:23 AM.


MobileRead.com is a privately owned, operated and funded community.