Version: 1.2.91 (using KDE 3.1.9) Compiler: gcc version 3.3 20030226 (prerelease) (SuSE Linux) OS: Linux (i686) release 2.4.20-4GB-athlon I think it would be more useful if tab and enter moved the cursor to the left and down cells respectively, instead of inserting those characters. This is standard in most word processers (especially the tab function). When typing up labels, etc, its very teadious to click in each cell for each entry.
Then it becomes impossible to type these characters; try using the arrow up and down instead.
What is the way to make new paragraphs then, if ENTER is used. (I can only remember spreadsheets having this function, no wordprocessor, so I am a little surprised.) As for Tab and Shift-Tab the patch exists now. Have a nice day!
> As for Tab and Shift-Tab the patch exists now. What do you mean? The tab should still simply insert a 'tab' character, no?
In 99.99% (KWord excepted for now) of the wordprocessors with table suppot that I know, tab and shift-tab navigate through the table (cell left, cell right.) In tables you normally do not need any tabulator character (that is why tables are for.) In exceptional case where you need one, there is an alternate key (in MS Word, Control-Tab, which is not usable in KDE, as it is Desktop-switching.) Therefore I have made the patch (posted in koffice-devel) after having catched myself three times in the last week pressing tab to get to the next cell. As KDE cannot handle Control-Tab, I have chsoen to use any combinaison of Control and Tab (For example Alt-Control-Tab.) (In this point the patch has a little problem, as Shift-Tab is Backtab, but it is easily changeable.) And as written in bug #41752, down and up are *not* alternatives: - Users are not used to them - Down selects the next paragraph in the cell first. Tab goes directly to the next cell. Have a nice day!
Fair enough; when the patch is sane (I won't comment from a technical POV) I'd like to see that commited.
Subject: koffice/kword CVS commit by goutte: Add tabulator navigation in tables. (Tab for cell right, Shift-Tab for cell left) (The replacement key for a real tabulator is normally Control-Tab, but as it is used in KDE, any combinaison with Control-Tab will do. I recommend using Alt-Control-Tab.) CCMAIL:61039-close@bugs.kde.org CCMAIL:41752@bugs.kde.org M +22 -3 kwtableframeset.cc 1.250 --- koffice/kword/kwtableframeset.cc #1.249:1.250 @@ -2636,4 +2636,5 @@ void KWTableFrameSetEdit::keyPressEvent( KWTableFrameSet::Cell *fs = 0L; + bool tab=false; // No tab key pressed if(moveToOtherCell) { @@ -2685,8 +2686,13 @@ void KWTableFrameSetEdit::keyPressEvent( } break; + case QKeyEvent::Key_Backtab: + tab=true; + if (e->state() & QKeyEvent::ControlButton) + break; // Break if tab was pressed with Control (in *any* key combination) + // Do not break case QKeyEvent::Key_Left: { KoTextCursor *cur = (static_cast<KWTextFrameSetEdit *>(m_currentCell))->cursor(); - if(!cur->parag()->prev()&&cur->index()==0) + if ( tab || (!cur->parag()->prev()&&cur->index()==0) ) { KWTableFrameSet* tableFrame=tableFrameSet(); @@ -2710,8 +2716,13 @@ void KWTableFrameSetEdit::keyPressEvent( } break; + case QKeyEvent::Key_Tab: + tab=true; + if (e->state() & QKeyEvent::ControlButton) + break; // Break if tab was pressed with Control (in *any* key combination) + // Do not break case QKeyEvent::Key_Right: { KoTextCursor *cur = (static_cast<KWTextFrameSetEdit *>(m_currentCell))->cursor(); - if(!cur->parag()->next()&&cur->index()==cur->parag()->string()->length()-1) + if( tab || (!cur->parag()->next()&&cur->index()==cur->parag()->string()->length()-1) ) { KWTableFrameSet* tableFrame=tableFrameSet(); @@ -2745,5 +2756,13 @@ void KWTableFrameSetEdit::keyPressEvent( { if ( !textframeSet->textObject()->protectContent() ) + { + if (tab && (e->state() & QKeyEvent::ControlButton) ) + { + QKeyEvent event(QEvent::KeyPress, QKeyEvent::Key_Tab, 9, 0, QChar(9)); + m_currentCell->keyPressEvent( &event ); + } + else m_currentCell->keyPressEvent( e ); + } else KMessageBox::information(0L, i18n("Read-only content cannot be changed. No modifications will be accepted."));