12-20-2019, 11:18 AM | #46 | |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
I just spent time eyeballing this code and blockingMap is used with QtConcurrent so nothing will be returned until all threads except the main one are reaped/collected.
So the extra sections problem does not appear to be threading caused/related at all to me. So this brings us back to sticking keys I think or key related Qt bugs. Kevin Quote:
|
|
12-20-2019, 02:59 PM | #47 | ||
Groupie
Posts: 159
Karma: 91148
Join Date: Jun 2010
Device: Sony 350
|
Quote:
Quote:
|
||
12-20-2019, 03:11 PM | #48 | |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Okay, I have modified the source code of Sigil to print qDebug() output that shows the keys actually being received in the ShortCut Manager Preferences and it also shows the native scan code, native modifiers, and native virtual key values. I have pushed this to Sigil master.
@DiapDealer, since you can duplicate this issue when using the US International keyboard layout, perhaps you could log the debug output from testing the problem under both the US and US International keyboards so we can compare the output for the same key sequence that does not seem to work. ps. I have tested this on macOS and it seems to record the modifiers exactly as stated in the QKeyEvent class documentation for macOS so I can not recreate this issue. KevinH Quote:
|
|
12-20-2019, 03:13 PM | #49 | |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
We can add some debug code to output each time the routine in invoked. If your key sticks or is on some sort of autorepeat, we should be able to detect that.
I will try to figure out the best place to do that in the source code. KevinH Quote:
|
|
12-20-2019, 03:51 PM | #50 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
@Mister L,
Okay, just pushed some debug code to track how split at cursor is being invoked. If you are willing to try a debug build, and can use environment variables to create a log file using "SIGIL_DEBUG_LOGFILE" environment variable and repeat it to see if you can get it to record the error and if so send us the log file, please pm DiapDealer and ask? |
12-20-2019, 04:41 PM | #51 | |
Groupie
Posts: 159
Karma: 91148
Join Date: Jun 2010
Device: Sony 350
|
Quote:
|
|
12-20-2019, 06:42 PM | #52 | |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Perhaps this is part of the problem. |
|
12-20-2019, 07:53 PM | #53 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
The actual Qt code includes that modifier (from qevent.cpp)
Code:
Qt::KeyboardModifiers QKeyEvent::modifiers() const { if (key() == Qt::Key_Shift) return Qt::KeyboardModifiers(QInputEvent::modifiers()^Qt::ShiftModifier); if (key() == Qt::Key_Control) return Qt::KeyboardModifiers(QInputEvent::modifiers()^Qt::ControlModifier); if (key() == Qt::Key_Alt) return Qt::KeyboardModifiers(QInputEvent::modifiers()^Qt::AltModifier); if (key() == Qt::Key_Meta) return Qt::KeyboardModifiers(QInputEvent::modifiers()^Qt::MetaModifier); if (key() == Qt::Key_AltGr) return Qt::KeyboardModifiers(QInputEvent::modifiers()^Qt::GroupSwitchModifier); return QInputEvent::modifiers(); } |
12-20-2019, 07:54 PM | #54 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
That said, the modifiers in the added qdebug will list all valid modifier flags including the altgr if it is used.
|
12-20-2019, 08:51 PM | #55 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
MisterL
would you try using the right Ctrl key instead of the left Ctrl Key when you try to set that shortcut and let me know if it makes a difference? I found a Qt note that says the Windows keyboard mapper code for some keyboardmaps will interpret a left Ctrl followed by a right Alt (or Menu) key as you using the AltGr key instead. I was hoping to avoid that by you trying to set the shortcut only with the right Ctrl key andnot the left one to see if that impacts things. Last edited by KevinH; 12-20-2019 at 08:56 PM. |
12-21-2019, 02:38 PM | #56 | |
Running with scissors
Posts: 1,552
Karma: 14325282
Join Date: Nov 2019
Device: none
|
Quote:
Code:
k = key(); if (k == Qt::Key_Shift) etc. |
|
12-21-2019, 03:30 PM | #57 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
no it is a property of the const event
|
12-22-2019, 12:24 PM | #58 |
Junior Member
Posts: 4
Karma: 394
Join Date: Mar 2019
Device: Kindle
|
I see that several people are experiencing the same error.
Well, it doesn't appear to be a sticky key, the same behavior occurs using the "Edit, Split At Cursor" menu. Looks like the error is related to "Tabs" closing. Everything seems to work fine until you close one or more tabs, the next time you use "Split At Cursor" you get this "error". Closing two tabs gives you 2 "blank" sections, 5 tabs get 5. Poorly explained, maybe my screenshot is better? Svein Last edited by DiapDealer; 12-22-2019 at 03:02 PM. |
12-22-2019, 02:59 PM | #59 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Two is several, now?
Please make sure to not include inline images with either dimension more than 600px. It's against forum rules. Attach them to the post (and optionally inline a thumbnail). I'll fix this one for you. Last edited by DiapDealer; 12-22-2019 at 03:14 PM. |
12-22-2019, 03:14 PM | #60 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
But I can finally duplicate it. In a few simpler steps. Thanks for sticking to it until you found something reproduceable!
1) make sure Sigil is closed 2) launch Sigil (empty epub) 3) click File->New->Default|Epub2|Epub33 (doesn't matter what kind of new epub) 4) place cursor before the p tag in Code View 5) split using the shortcut or Edit->Split at Cursor The bottom line is that the problem doesn't manifest until some tabs get closed/destroyed. Seems to get worse with each tab that gets closed (or each new epub that's created without closing Sigil and relaunching). @Kevin: I don't know that it's necessarily another issue associated with the Create New Epub2|3 feature, because I can get it to happen without using it. Closing some open tabs in general seems to trigger it. Until you close a tab, splitting seems to work as expected. Reproduceable on Windows 10 and Linux. Last edited by DiapDealer; 12-22-2019 at 04:38 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil-0.9.18 Released | DiapDealer | Sigil | 20 | 09-13-2019 09:08 AM |
Sigil-0.9.4 Released | KevinH | Sigil | 40 | 03-26-2016 10:15 AM |
Sigil-0.8.900 released for testing - Wait for Sigil-0.8.901 | KevinH | Sigil | 106 | 10-04-2015 10:41 AM |
Sigil 0.8.3 Released | user_none | Sigil | 10 | 02-02-2015 04:32 PM |
Sigil 0.4.2 Released | user_none | Sigil | 41 | 10-26-2011 06:03 AM |