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-09-2021, 02:50 PM   #46
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,766
Karma: 3571822
Join Date: Nov 2009
Device: many
We can change things to ifdef that Windows routine and convert the nativeVirtualKeyCode on Windows if that is what Windows users want.

I personally expect when entering Meta+Shift+1 to see Meta+! and ditto for Alt, as a result because Shift+1 is the ! character and that is how it typically worked on MacOS and Linux.

But I am open to either since I am not a Windows user and as long as we do not need to change the Sigil link command to include a new library.
KevinH is offline   Reply With Quote
Old 09-09-2021, 02:59 PM   #47
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:
Originally Posted by KevinH View Post
But I am confused ... did calibre's code work correctly and you just did not "like" the Shortcut shown, or did it actually fail with some key sequences and that is why you did not "like" the Shortcut shown?
Calibre's code work correctly, and newest build Sigil's work correctly too.
I just don't like the shortcut shown, but obviously it's more important to get it right than display the shortcut.

Quote:
Originally Posted by KevinH View Post
And what do you mean by "when in the field with the shortcut"?
Fiels = Input "Shortcut" in Preferences > Keyboard Shortcuts.

Quote:
Originally Posted by KevinH View Post
Do you mean the "Ctrl+!" output shown? If so, that is not meant to be an input field to be edited. Entering other keys there will create issues. For example the del key or backspace will erase the key sequence completely. It is not meant for editing directly but to display the key sequence entered.
Of course I understand that!

Quote:
Originally Posted by KevinH View Post
Or do you mean the table entry itself or when editing the ini?
The entry itself in the table. But when I think about it, the entry in the table is not crucial, because correct operation is more important. So let's admit that it's better, although it is worth having other people testing it with international keyboards.
BeckyEbook is offline   Reply With Quote
Advert
Old 09-09-2021, 03:13 PM   #48
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
But there is one thing that works worse.
Well – if you remember – in Windows, users using international keyboards should add the -platform windows:altgr parameter, which allows, for example, to easily call even the default keyboard shortcuts for Clips.

Sigil 1.7.0 (with parameter) nicely distinguishes left Alt and right Alt, and unfortunately the latest build displays garbage for right Alt+letter.
Attached Thumbnails
Click image for larger version

Name:	sigil-170.png
Views:	33
Size:	3.8 KB
ID:	189170   Click image for larger version

Name:	sigil-newest-build.png
Views:	30
Size:	6.0 KB
ID:	189171  
BeckyEbook is offline   Reply With Quote
Old 09-09-2021, 03:20 PM   #49
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,766
Karma: 3571822
Join Date: Nov 2009
Device: many
Hmm okay. Does your version using the Windows call to map the nativeVirtualKeyCode to its char work properly with -platform windows:altgr

If so that is a strong argument to go with your added Windows call approach.

Or did we mess that up with an earlier change to master?
KevinH is offline   Reply With Quote
Old 09-09-2021, 03:41 PM   #50
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,544
Karma: 167414566
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
If all we're doing is removing the Shift on Windows when the Shift is unnecessary (and problematic), I can't see how that would affect the display of a Right Alt+letter sequence on an International Keyboard. I'm confused.
DiapDealer is online now   Reply With Quote
Advert
Old 09-09-2021, 03:56 PM   #51
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,544
Karma: 167414566
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by BeckyEbook View Post
But there is one thing that works worse.
Well – if you remember – in Windows, users using international keyboards should add the -platform windows:altgr parameter, which allows, for example, to easily call even the default keyboard shortcuts for Clips.
Is that a command-line parameter for running Sigil? This is the first I've heard of international keyboard users needing to add special parameters for running Sigil. Would most users even know how? If it's necessary, then we should probably find a way to load it programmatically via a pref setting rather than relying on people stumbling across an obscure parameter to the qwindow platform plugin. Can you point me to some documentation on that platform plugin parameter? I can't seem to find anything.
DiapDealer is online now   Reply With Quote
Old 09-09-2021, 04:02 PM   #52
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:
Originally Posted by DiapDealer View Post
If all we're doing is removing the Shift on Windows when the Shift is unnecessary (and problematic), I can't see how that would affect the display of a Right Alt+letter sequence on an International Keyboard. I'm confused.
I specially installed an additional Spanish keyboard layout in which AltGr+;=ñ
And now, when in the Keyboard Shortcuts window I select the AltGr+; then I get garbage.
But I note that this only happens when starting Sigil with the parameter.

Again, I suspect this is such an extremely rare situation for another Windows user to encounter this problem that I wonder if it is worth wasting your precious time on it.

It would have to be:
a) Windows user who
b) uses the international keyboard and obtains additional characters using AltGr
c) runs Sigil with an additional parameter
d) would have the crazy idea to use a shortcut with AltGr if he can use the left Alt for this and then everything works fine.
BeckyEbook is offline   Reply With Quote
Old 09-09-2021, 04:08 PM   #53
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,544
Karma: 167414566
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I'm not opposed to looking into it, I'm just completely in the dark on there being an altgr platform plugin parameter in the first place.
DiapDealer is online now   Reply With Quote
Old 09-09-2021, 04:09 PM   #54
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:
Originally Posted by DiapDealer View Post
Can you point me to some documentation on that platform plugin parameter? I can't seem to find anything.
https://doc.qt.io/qt-5/qguiapplicati...GuiApplication

We talked about it here:
https://github.com/Sigil-Ebook/Sigil/issues/474

the parameter was mentioned e.g. here:
https://bugreports.qt.io/browse/QTBU...comment-504202

https://bugreports.qt.io/browse/QTBU...comment-416209

is also in Sigil's documentation:
https://github.com/Sigil-Ebook/sigil...faq.xhtml#L228
BeckyEbook is offline   Reply With Quote
Old 09-09-2021, 04:44 PM   #55
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,766
Karma: 3571822
Join Date: Nov 2009
Device: many
One other difference, in the calibre way we simply remove the shift modifier and leave all other modifiers alone, but in the old way, we started with 0 and or'd in just the flags we wanted to use. So if there is an altgr flag mapped to a GroupModifier it got lost in the old way. Perhaps that is what we need to do under calibre's approach as well?

Also the two approaches treat number (digits) chars differently based on text() values.


Quote:
Originally Posted by DiapDealer View Post
If all we're doing is removing the Shift on Windows when the Shift is unnecessary (and problematic), I can't see how that would affect the display of a Right Alt+letter sequence on an International Keyboard. I'm confused.

Last edited by KevinH; 09-09-2021 at 06:17 PM.
KevinH is offline   Reply With Quote
Old 09-10-2021, 08:14 AM   #56
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,766
Karma: 3571822
Join Date: Nov 2009
Device: many
@BeckyEbook, I will need help tracking down what got broken with the altgr command line switch being enabled in order to fix it.

What does the debug output say when using it?

How does the list of modifiers (value of state) differ between when a normal alt is done vs an altgr?

Or are the modifiers unchanged and it just changes the key() or text() value to reflect the fact that altgr us being used?
KevinH is offline   Reply With Quote
Old 09-10-2021, 08:59 AM   #57
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
Debug.

The order of my shortcuts:
  • h
  • Shift+h
  • Ctrl+h
  • leftAlt+h
  • AltGr+h
  • 1
  • Shift+1
  • Ctrl+1
  • leftAlt+1
  • AltGr+1
  • leftAlt+l (lowercase L)
  • AltGr+l (ł on Polish keyboard)
  • Shift+AltGr+l (Ł on Polish keyboard)

Issue (garbage visible in "Shortcut" input box) occurs only when the parameter is enabled and only when using the shortcut from AltGr. The other shortcuts appear identical.
Attached Files
File Type: txt sigil-debug-master.txt (2.4 KB, 21 views)
File Type: txt sigil-debug-master-altgr.txt (2.4 KB, 23 views)
BeckyEbook is offline   Reply With Quote
Old 09-10-2021, 09:20 AM   #58
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,766
Karma: 3571822
Join Date: Nov 2009
Device: many
If you get a chance can you copy the qdebug and add it to the working Sigil 1.7.0 version, use the altgr command line with it and run the exact same tests and post its output as well.

That way can see what changes if anything between working and non-working versions when altgr is added to the command line.

At first glance, adding altgr to command line changed the modifier flags from both Ctrl+Alt used to GroupModifier used which seems to match the qt docs but KeyboardShortcuts.cpp handleKey never even looks or adds in the GroupModifier so I am unsure how that worked at all!
KevinH is offline   Reply With Quote
Old 09-10-2021, 09:49 AM   #59
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
QDebug added to 1.7.0.
Attached Files
File Type: txt sigil-debug-170-altgr.txt (2.4 KB, 34 views)
BeckyEbook is offline   Reply With Quote
Old 09-10-2021, 09:55 AM   #60
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,766
Karma: 3571822
Join Date: Nov 2009
Device: many
I searched the Qt 5.12 codebase for GroupSwitchModifier and it is not used in QKeySequence at all (qtbase/src/gui/kernel/qkeysequence.cpp). In fact it appears to not be supported in much code at all.

In Sigil 1.7 in KeyboardShortcutsWidget.cpp we build up the resulting modifier by checking modifier flags but do not handle the GroupSwitchModifier at all so it gets stripped out but the actual key() value reflects its use with altgr in the command line.

In current master, the key() with altgr in the command line does reflect its use but the GroupSwitchModifier is kept. And that seems to confuse QKeySequence since it does not grok the GroupSwitchModifier at all.

I will try in master or Windows checking for the GroupModifier and if set remove it before trying calibre's approach in the hopes everything just works.
KevinH 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 03:12 PM.


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