Buggy code:
public static Display getCurrent ( ) { } int getCaretBlinkTime ( ) { } public Control getCursorControl ( ) { } boolean filterEvent ( Event event ) { } boolean filters ( int eventType ) { } int filterProc ( int xEvent , int gdkEvent , int data ) { } public Point getCursorLocation ( ) { } public Point [ ] getCursorSizes ( ) { } public Object getData ( String key ) { } public Object getData ( ) { } public Point getDPI ( ) { } int gtk_fixed_get_type ( ) { } int gtk_cell_renderer_text_get_type ( ) { } int gtk_cell_renderer_pixbuf_get_type ( ) { } int gtk_cell_renderer_toggle_get_type ( ) { } public static Display getDefault ( ) { } static boolean isValidClass ( Class clazz ) { } public int getDismissalAlignment ( ) { } public int getDoubleClickTime ( ) { } public Control getFocusControl ( ) { } public boolean getHighContrast ( ) { } public int getDepth ( ) { } public int getIconDepth ( ) { } public Point [ ] getIconSizes ( ) { } int getLastEventTime ( ) { } int getMessageCount ( ) { } Dialog getModalDialog ( ) { } Rectangle getWorkArea ( ) { } public Monitor [ ] getMonitors ( ) { } public Monitor getPrimaryMonitor ( ) { } public Shell [ ] getShells ( ) { } public Synchronizer getSynchronizer ( ) { } public Thread getSyncThread ( ) { } public Color getSystemColor ( int id ) { } public Cursor getSystemCursor ( int id ) { } public Image getSystemImage ( int id ) { } void initializeSystemColors ( ) { } public Font getSystemFont ( ) { } public Tray getSystemTray ( ) { } public Thread getThread ( ) { } Widget getWidget ( int handle ) { } int idleProc ( int data ) { } protected void init ( ) { } void initializeCallbacks ( ) { } void initializeSystemSettings ( ) { } void initializeWidgetTable ( ) { } void initializeWindowManager ( ) { } public void internal_dispose_GC ( int gdkGC , GCData data ) { } public int internal_new_GC ( GCData data ) { } boolean isValidThread ( ) { } public Point map ( Control from , Control to , Point point ) { } public Point map ( Control from , Control to , int x , int y ) { } public Rectangle map ( Control from , Control to , Rectangle rectangle ) { } static char mbcsToWcs ( char ch ) { } int menuPositionProc ( int menu , int x , int y , int push_in , int user_data ) { } public Rectangle map ( Control from , Control to , int x , int y , int width , int height ) { } int mouseHoverProc ( int handle ) { } public boolean post ( Event event ) { synchronized ( Device . class ) { if ( isDisposed ( ) ) error ( ERROR_DEVICE_DISPOSED ) ; if ( event == null ) error ( ERROR_NULL_ARGUMENT ) ; if ( ! ( OS . GDK_WINDOWING_X11 ( ) ) ) return false ; int xDisplay = OS . GDK_DISPLAY ( ) ; int type = event . type ; switch ( type ) { case SWT . KeyDown : case SWT . KeyUp : { int keyCode = 0 ; int keysym = Display . untranslateKey ( event . keyCode ) ; if ( keysym != 0 ) keyCode = OS . XKeysymToKeycode ( xDisplay , keysym ) ; if ( keyCode == 0 ) { char key = event . character ; switch ( key ) { case SWT . BS : keysym = OS . GDK_BackSpace ; break ; case SWT . CR : keysym = OS . GDK_Return ; break ; case SWT . DEL : keysym = OS . GDK_Delete ; break ; case SWT . ESC : keysym = OS . GDK_Escape ; break ; case SWT . TAB : keysym = OS . GDK_Tab ; break ; case SWT . LF : keysym = OS . GDK_Linefeed ; break ; default : <START_BUG> keysym = Display . wcsToMbcs ( key ) ; <END_BUG> } keyCode = OS . XKeysymToKeycode ( xDisplay , keysym ) ; if ( keyCode == 0 ) return false ; } OS . XTestFakeKeyEvent ( xDisplay , keyCode , ( type == ( SWT . KeyDown ) ) , 0 ) ; return true ; } case SWT . MouseDown : case SWT . MouseMove : case SWT . MouseUp : { if ( type == ( SWT . MouseMove ) ) { OS . XTestFakeMotionEvent ( xDisplay , ( - 1 ) , event . x , event . y , 0 ) ; } else { int button = event . button ; switch ( button ) { case 1 : case 2 : case 3 : break ; case 4 : button = 6 ; break ; case 5 : button = 7 ; break ; default : return false ; } OS . XTestFakeButtonEvent ( xDisplay , button , ( type == ( SWT . MouseDown ) ) , 0 ) ; } return true ; } } return false ; } } void postEvent ( Event event ) { } void putGdkEvents ( ) { } public boolean readAndDispatch ( ) { } static void register ( Display display ) { } protected void release ( ) { } void releaseDisplay ( ) { } public void removeFilter ( int eventType , Listener listener ) { } int removeGdkEvent ( ) { } void removeIdleProc ( ) { } public void removeListener ( int eventType , Listener listener ) { } void removeMouseHoverTimeout ( int handle ) { } void removePopup ( Menu menu ) { } Widget removeWidget ( int handle ) { } boolean runAsyncMessages ( boolean all ) { }

Fix:
keysym = key ;