Bug 92824 - shortcut menu problem on ppc64
Summary: shortcut menu problem on ppc64
Status: RESOLVED FIXED
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-06 21:28 UTC by Markus Rothe
Modified: 2005-03-14 08:08 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot.png (25.38 KB, image/png)
2004-11-06 21:30 UTC, Markus Rothe
Details
Screenshot of it happening on a different system (413.21 KB, image/png)
2004-12-05 15:46 UTC, Paul Kline
Details
patch for kdelibs-3.3.2 on ppc64 (892 bytes, patch)
2005-01-26 17:25 UTC, Yuta SATOH
Details
The debugging log before applying the patch (66.12 KB, text/plain)
2005-01-26 17:26 UTC, Yuta SATOH
Details
The debugging log after applying the patch (69.89 KB, text/plain)
2005-01-26 17:27 UTC, Yuta SATOH
Details
Sample code (617 bytes, text/plain)
2005-03-12 19:04 UTC, Yuta SATOH
Details
new patch for kdelibs-3.3.2 on ppc64 (1.38 KB, patch)
2005-03-12 19:11 UTC, Yuta SATOH
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Rothe 2004-11-06 21:28:53 UTC
Version:            (using KDE KDE 3.3.1)
Installed from:    Compiled From Sources
Compiler:          gcc-3.4.1 patches by gentoo (-r3)
OS:                Linux

Hi,

I'm using kde-3.3.1 on Gentoo/PPC64.

Every time I try to write an capital letter in any kde application I get an ugly shortcut menu in the upper left corner and the letter isn't written. But it are not only capital letters which let this menu pop up. It are all combinations of "shift + another key".

Please take a look at the screenshot I've made. (will attach that later)

Markus
Comment 1 Markus Rothe 2004-11-06 21:30:46 UTC
Created attachment 8201 [details]
screenshot.png

the screenshot
Comment 2 Stephan Binner 2004-11-08 10:20:16 UTC
Looks like a menu list of all actions which are not present in the UI!?
Comment 3 Daniel Ostrow 2004-11-09 01:16:44 UTC
A minor update on circumstances, in addition to being triggered by the shift key the control and alt keys periodically trigger it. It also does not happen when editing data in a combo/text box such as the search field on google or the address bar in konqueror. It always happens when running konsole. Also it is limited to kde apps, launching gvim, x-chat, xmms, etc does not create the problem even when using kde. By double tapping the intended target key e.g. shift+a+a you do end up with a capital A. Likewise any third key press while holding the shift key will have the appropriate result shift+;+esc will make you end up with a : as would be expected without the third key press. The third key press just seems to cancel the call up of the menu.
Comment 4 Paul Kline 2004-12-05 15:36:15 UTC
*** This bug has been confirmed by popular vote. ***
Comment 5 Paul Kline 2004-12-05 15:46:12 UTC
Created attachment 8544 [details]
Screenshot of it happening on a different system
Comment 6 Waldo Bastian 2005-01-05 18:29:58 UTC
Looks like the shortcut handling gone wild.
Comment 7 Jeff Scroggins 2005-01-05 23:15:34 UTC
> ------- You are receiving this mail because: -------
> You are a voter for the bug, or are watching someone who is.
>
> http://bugs.kde.org/show_bug.cgi?id=92824
>
>
>
>
> ------- Additional Comments From bastian kde org  2005-01-05 18:29 -------
> Looks like the shortcut handling gone wild.
>

Is it fixable?


Comment 8 Yuta SATOH 2005-01-26 17:23:59 UTC
I think that this problem is because the shortcut key is not processed appropriately.

For example,
kdecore (KAccel): KAccelBase::insertConnection( 0x1030e390="Open"; shortcut = Ctrl+O )  this = 0x1030e2b0
kdecore (KAccel): KAccelPrivate::connectKey( "Open", Ctrl+ = 0x400000 ): id = -6 m_pObjSlot = 0x1030b720


I created the patch for this problem not to occur.
When this patch is applied, shortcut keys seems to operate on PPC64.

However, I'm diffident of change of these codes.
I'm glad if this patch is a help to someone who discovers a better method.

Thank you.
Comment 9 Yuta SATOH 2005-01-26 17:25:53 UTC
Created attachment 9299 [details]
patch for kdelibs-3.3.2 on ppc64
Comment 10 Yuta SATOH 2005-01-26 17:26:50 UTC
Created attachment 9300 [details]
The debugging log before applying the patch

This log when starting Kate and ending(Only KAccel)
Comment 11 Yuta SATOH 2005-01-26 17:27:59 UTC
Created attachment 9301 [details]
The debugging log after applying the patch

This log when starting Kate and ending(Only KAccel)
Comment 12 Waldo Bastian 2005-01-26 18:39:55 UTC
CVS commit by waba: 

Send notification when emptying trash
TODO: Create an actual sound for this event and associate it with the event
by default.
CCBUG:92824


  M +2 -0      konq_operations.cc   1.160


--- kdebase/libkonq/konq_operations.cc  #1.159:1.160
@@ -24,4 +24,5 @@
 #include <klocale.h>
 #include <kmessagebox.h>
+#include <knotifyclient.h>
 #include <krun.h>
 #include <kshell.h>
@@ -206,4 +207,5 @@ void KonqOperations::_del( int method, c
         stream << (int)1;
         job = KIO::special( "trash:/", packedArgs );
+        KNotifyClient::event(0, "Trash: emptied");
         break;
       }


Comment 13 Waldo Bastian 2005-01-26 18:40:22 UTC
Oops, wrong bugreport :)
Comment 14 Yuta SATOH 2005-03-12 19:04:05 UTC
Created attachment 10083 [details]
Sample code

I think that this problem is brought about because operation of the cast on
ppc64 differs from other platforms. 
So, I think that this problem does not relate only to KDE. 
Please give an opinion about it.

FYI, The following result was displayed when the attached code was compiled and
performed. 

On ppc64

12345,	sizeof:4
0,	sizeof:4
0,	sizeof:8

On x86 and ppc

12345, sizeof:4
12345, sizeof:4
98765, sizeof:4

On alpha
12345, sizeof:4
12345, sizeof:4
98765, sizeof:8
Comment 15 Yuta SATOH 2005-03-12 19:11:23 UTC
Created attachment 10084 [details]
new patch for kdelibs-3.3.2 on ppc64

If you want to work KDE normally on ppc64 NOW, please use this patch instead of
the patch which I attached first until a problem is essentially solved.

The problem about the keyboard shortcut doesn't occur by applying this patch in
my environment.

Thank you.
Comment 16 Waldo Bastian 2005-03-13 15:45:02 UTC
CVS commit by waba: 

Fix casting for 64-bit PPC.
BUG: 92824


  M +3 -1      kkeynative_x11.cpp   1.23
  M +3 -1      kkeyserver_x11.cpp   1.33


--- kdelibs/kdecore/kkeyserver_x11.cpp  #1.32:1.33
@@ -757,4 +757,5 @@ bool modXToMod( uint modX, uint& mod )
 bool codeXToSym( uchar codeX, uint modX, uint& sym )
 {
+        KeySym keySym;
         XKeyPressedEvent event;
 
@@ -764,5 +765,6 @@ bool codeXToSym( uchar codeX, uint modX,
         event.keycode = codeX;
 
-        XLookupString( &event, 0, 0, (KeySym*) &sym, 0 );
+        XLookupString( &event, 0, 0, &keySym, 0 );
+        sym = (uint) keySym;
         return true;
 }

--- kdelibs/kdecore/kkeynative_x11.cpp  #1.22:1.23
@@ -80,7 +80,9 @@ void KKeyNative::clear()
 bool KKeyNative::init( const XEvent* pEvent )
 {
+        KeySym keySym;
         m_code = pEvent->xkey.keycode;
         m_mod = pEvent->xkey.state;
-        XLookupString( (XKeyEvent*) pEvent, 0, 0, (KeySym*) &m_sym, 0 );
+        XLookupString( (XKeyEvent*) pEvent, 0, 0, &keySym, 0 );
+        m_sym = (uint) keySym;
         return true;
 }
Comment 17 Waldo Bastian 2005-03-13 15:49:49 UTC
Hi Yuta, thank you for your patch. Can you confirm whether the above patches that I commited do indeed fix the problem?
Comment 18 Yuta SATOH 2005-03-13 19:41:52 UTC
Hi Waldo, I applied your patch to kdelibs-3.2.3 and I confirmed that this problem was solved on PPC64.
Thank You!
Comment 19 Yuta SATOH 2005-03-14 08:08:55 UTC
my bad...
s/kdelibs-3.2.3/kdelibs-3.3.2/