Index: kshortcutdialog.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeui/kshortcutdialog.cpp,v
retrieving revision 1.25
diff -u -r1.25 kshortcutdialog.cpp
--- kshortcutdialog.cpp	3 Nov 2004 16:15:17 -0000	1.25
+++ kshortcutdialog.cpp	8 Nov 2004 21:22:48 -0000
@@ -37,6 +37,8 @@
 		#undef FocusOut
 		#undef FocusIn
 	#endif
+#elif defined(Q_WS_WIN)
+# include <kkeyserver.h>
 #endif
 
 #include <kshortcutdialog_simple.h>
@@ -232,7 +234,7 @@
 	m_ptxtCurrent->setFocus();
 	updateShortcutDisplay();
 }
-        
+
 void KShortcutDialog::slotSelectAlternate()
 {
 	m_bRecording = false;
@@ -385,8 +387,101 @@
 		updateShortcutDisplay();
 	}
 }
+#elif defined(Q_WS_WIN)
+void KShortcutDialog::keyPressEvent( QKeyEvent * e )
+{
+	int keyQt = QChar( e->key() ).lower().latin1(); //if key is a character, it must be stored as lowercase
+	int modQt = KKeyServer::qtButtonStateToMod( e->state() );
+	KKeyNative keyNative( KKey(keyQt, modQt) );
+	m_mod = keyNative.mod();
+	uint keySym = keyNative.sym();
+
+	switch( keySym ) {
+		case Key_Shift: 
+			m_mod |= KKey::SHIFT;
+			m_bRecording = true;
+			break;
+		case Key_Control:
+			m_mod |= KKey::CTRL;
+			m_bRecording = true;
+			break;
+		case Key_Alt:
+			m_mod |= KKey::ALT;
+			m_bRecording = true;
+			break;
+		case Key_Menu:
+		case Key_Meta: //unused
+			break;
+		default:
+			if( keyNative.sym() == Key_Return && m_iKey > 0 ) {
+				accept();
+				return;
+			}
+			if( ((m_iKey==0 && m_mod) || m_iKey > 0) && /*pEvent->type == XKeyPress &&*/ keyNative.sym() ) {
+				// If RETURN was pressed and we are recording a
+				//  multi-key shortcut, then we are done.
+
+				KKey key = keyNative;
+				key.simplify();
+				KKeySequence seq;
+				if( m_iKey == 0 )
+					seq = key;
+				else {
+					seq = m_shortcut.seq( m_iSeq );
+					seq.setKey( m_iKey, key );
+				}
+				m_shortcut.setSeq( m_iSeq, seq );
+
+				if(m_adv->m_btnMultiKey->isChecked())
+					m_iKey++;
+
+				m_bRecording = true;
 
-#endif // QT_WS_X11
+				updateShortcutDisplay();
+
+				if( !m_adv->m_btnMultiKey->isChecked() )
+					QTimer::singleShot(500, this, SLOT(accept()));
+			}
+			return;
+	}
+
+	// If we are editing the first key in the sequence,
+	//  display modifier keys which are held down
+	if( m_iKey == 0 ) {
+		updateShortcutDisplay();
+	}
+}
+
+bool KShortcutDialog::event ( QEvent * e )
+{
+	if (e->type()==QEvent::KeyRelease) {
+		int modQt = KKeyServer::qtButtonStateToMod( static_cast<QKeyEvent*>(e)->state() );
+		KKeyNative keyNative( KKey(static_cast<QKeyEvent*>(e)->key(), modQt) );
+		uint keySym = keyNative.sym();
+
+		bool change = true;
+		switch( keySym ) {
+		case Key_Shift: 
+			if (m_mod & KKey::SHIFT)
+				m_mod ^= KKey::SHIFT;
+			break;
+		case Key_Control:
+			if (m_mod & KKey::CTRL)
+				m_mod ^= KKey::CTRL;
+			break;
+		case Key_Alt:
+			if (m_mod & KKey::ALT)
+				m_mod ^= KKey::ALT;
+			break;
+		default:
+			change = false;
+		}
+		if (change)
+			updateShortcutDisplay();
+	}
+	return KDialogBase::event(e);
+}
+#endif
 
 void KShortcutDialog::keyPressed( KKey key )
 {
Index: kshortcutdialog.h
===================================================================
RCS file: /home/kde/kdelibs/kdeui/kshortcutdialog.h,v
retrieving revision 1.12
diff -u -r1.12 kshortcutdialog.h
--- kshortcutdialog.h	8 Sep 2004 19:30:58 -0000	1.12
+++ kshortcutdialog.h	8 Nov 2004 21:22:48 -0000
@@ -55,7 +55,6 @@
 	void setShortcut( const KShortcut & shortcut );
 	void updateShortcutDisplay();
 	//void displayMods();
-	void keyEvent( QKeyEvent * pEvent );
 	void keyPressed( KKey key );
 	void updateDetails();
 
@@ -65,6 +64,10 @@
 	void x11KeyPressEvent( XEvent* pEvent );
 	void x11KeyReleaseEvent( XEvent* pEvent );
 	#endif
+	#ifdef Q_WS_WIN
+	virtual void keyPressEvent( QKeyEvent * e );
+	virtual bool event(QEvent * e);
+	#endif
 
 private slots:
 	void slotDetails();
