Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jun 2011 21:49:15 GMT
From:      Kuan-Chung Chiu <buganini@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/157914: [patch] keymaps in textproc/ibus is incorrect
Message-ID:  <201106152149.p5FLnFH8090441@red.freebsd.org>
Resent-Message-ID: <201106152150.p5FLo9Vp020236@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         157914
>Category:       ports
>Synopsis:       [patch] keymaps in textproc/ibus is incorrect
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 15 21:50:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Kuan-Chung Chiu
>Release:        9.0-CURRENT
>Organization:
N/A
>Environment:
FreeBSD Elizabeth.twbbs.org 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r223098M: Wed Jun 15 06:39:48 CST 2011     root@Elizabeth.twbbs.org:/usr/obj/usr/src/sys/ELIZABETH  amd64
>Description:
The ${WRKSRC}/data/keymaps/common use linux's `xmodmap -pke` value - 8,
the -8 is hardcoded in every of ibus' bridge,
you can `grep -R keycode *|grep 8` in their source to find it.

And FreeBSD's xmodmap is differ from linux's:
http://security-hole.info/~buganini/linux.xmodmap.txt
http://security-hole.info/~buganini/freebsd.xmodmap.txt
http://security-hole.info/~buganini/linux-freebsd.xmodmap.txt

this difference make some keys malfunction if a im engine is designed use keycode and ibus_keymap_lookup_keysym() instead of using keyval/keysym directly.

Known affected im engine:
ibus-chewing
>How-To-Repeat:
type something with ibus-chewing and try to use left arrow the move to previous phrase.
>Fix:


Patch attached with submission follows:

diff -ruN ibus.orig/Makefile ibus/Makefile
--- ibus.orig/Makefile	2011-06-16 05:20:34.000000000 +0800
+++ ibus/Makefile	2011-06-16 05:20:47.000000000 +0800
@@ -7,6 +7,7 @@
 
 PORTNAME=	ibus
 PORTVERSION=	1.3.9
+PORTREVISION=	1
 CATEGORIES=	textproc
 MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
 
diff -ruN ibus.orig/files/patch-data-keymaps-common ibus/files/patch-data-keymaps-common
--- ibus.orig/files/patch-data-keymaps-common	1970-01-01 08:00:00.000000000 +0800
+++ ibus/files/patch-data-keymaps-common	2011-06-16 05:40:20.000000000 +0800
@@ -0,0 +1,28 @@
+--- data/keymaps/common.orig	2010-10-20 19:27:43.000000000 +0800
++++ data/keymaps/common	2011-06-16 05:39:55.000000000 +0800
+@@ -85,14 +85,14 @@
+     shift altgr keycode 86 = brokenbar
+ keycode 87 = F11
+ keycode 88 = F12
+-keycode 98 = KP_Divide
+-keycode 102 = Home
+-keycode 103 = Up
+-keycode 104 = Page_Up
+-keycode 105 = Left
+-keycode 106 = Right
+-keycode 107 = End
+-keycode 108 = Down
+-keycode 109 = Page_Down
+-keycode 110 = Insert
+-keycode 111 = Delete
++keycode 89 = Home
++keycode 90 = Up
++keycode 91 = Page_Up
++keycode 92 = Left
++keycode 94 = Right
++keycode 95 = End
++keycode 96 = Down
++keycode 97 = Page_Down
++keycode 98 = Insert
++keycode 99 = Delete
++keycode 104 = KP_Divide


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106152149.p5FLnFH8090441>