LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-10-2016, 04:37 PM   #1
CVAlkan
Member
 
Registered: Nov 2012
Location: Northwest suburbs of Chicago
Distribution: Ubuntu & Mint LTS, Manjaro Rolling; Android
Posts: 218

Rep: Reputation: Disabled
Remapping key in iBus


Hi: I'm not sure if this is the appropriate forum, so moderators feel free to move it.

I've been happily using the same keyboard - a Northgate OmniKey Ultra - for more than twenty years with a succession of computers and operating systems. Obviously, the keyboard has no Windows/Super key, which hasn't ever been a problem.

With each of the last few versions of Ubuntu (I'm currently using 16.04), I've taken stabs at assigning the "Omni" key (located in the center of the navigation keys - Home, End, Arrows, etc.).

Based on the following output of xev when the Omni key was pressed:

==========================================================================
KeyPress event, serial 37, synthetic NO, window 0x3c00001,
root 0x4a5, subw 0x0, time 39314148, (-41,265), root849,751),
state 0x10, keycode 120 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x3c00001,
root 0x4a5, subw 0x0, time 39314234, (-41,265), root849,751),
state 0x10, keycode 120 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
==========================================================================

I wrote a short shell script that mostly consists of the line: xmodmap -e "keycode 120=Super_L";

Running this causes a tap on the Omni key to show Ubuntu's Dash, and holding it down displays the Keyboard Shortcuts, so to that extent it "sort of works." I have two issues though.

1) How can I make this "stick" - i.e. so I don't have to run the shell script in order to use the Omni key. BEFORE suggesting that the script be added to the Startup Applications, there is a reason that doesn't solve the problem: which brings up the second issue.

2) I use iBus as an Input Method Editor to permit easily swtching among several scripts - primarily Greek and Thai. Although this works very well and is very convenient, switching to another keyboard layout wipes out the effects of the shell script. Several web sites suggest that iBus "overrides" any xmodmap settings.

As I said, having a pseudo-Super key isn't all that important, but it's beginning to annoy me that I can't figure out how to accomplish this. Here's what I have done:

a) I modified /usr/share/X11/xkb/keycodes/xfree86 and /usr/share/X11/xkb/keycodes/evdev to change the <LWIN> and <RWIN> values to 120.
b) I modified /usr/share/ibus/keymaps/modifiers to change the existing "keycode 125 = Super_L" to "keycode 120 = Super_L" - ditto for the Super_R line.

I have not modified any of the files in /usr/share/X11/xkb/symbols, since that seems to rely on already defined key names.

Does anyone have any suggested approaches to this: iBus is more important to me since I use it frequently, but it would still be nice to take advantage of other "Super" key command combinations.

Thanks in advance ...
 
  


Reply

Tags
key-binding


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
remapping an F-key to a string of text? dhuberma Linux - Newbie 3 03-21-2013 09:01 AM
Keyboard remapping, Custom key combinations clofal Linux - General 3 02-04-2012 12:45 AM
Remapping ksh key bindings Zmyrgel Linux - Software 0 12-04-2008 02:19 PM
Key remapping erickFis Slackware 0 02-12-2004 05:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration