[scribus-dev] Handling *all* keystrokes in canvas modes not possible?

Elvis Stansvik elvstone at gmail.com
Wed Aug 10 10:37:22 UTC 2011


Or actually no, seems my analysis was wrong.

Still trying to figure out how the textframe is able to capture all
keys, including things that are normally bound to global shortcuts.

Takes a while to take the code in :)

Any tips/pointers are welcome.

Elvis

2011/8/10 Elvis Stansvik <elvstone at gmail.com>:
> Good day,
>
> So I just did some experimentation, and I'm able to handle keyboard
> input in my table editing canvas mode and utilize the existing
> PageItem_TextFrame::handleModeEditKey(..) implementation, directly
> making things like arrow key navigation, backspace et.c. possible,
> which is good.
>
> However, some keys are bound to global menu shortcuts and such, and
> will not reach the canvas modes.
>
> For editing of regular text frames, the call to handleModeEditKey(..)
> occurs higher up, in ScribusMainWindow::keyPressEvent(..), not going
> through the canvas modes at all. This is how it's able to handle all
> keypresses.
>
> I guess I'll have to do something similar.
>
> I noticed:
>
> //AV -> CanvasMode
> void ScribusMainWindow::keyPressEvent(QKeyEvent *k)
>
> I guess "AV" is you avox? Does the comment mean that there's more work
> to be done here on CanvasMode-ifying the code, or was the comment just
> left as a "I was here" kind of comment?
>
> Cheers,
> Elvis
>



More information about the scribus-dev mailing list