arrow keys not working in Java application when using xmodmap

5

I've defined my keyboard mapping using xmodmap and it works beautifully with my browser and the rest of my software except java applications.

I tried switching the AWT_TOOLKIT to Mtoolkit instead but now instead of printing nothing, it is printing rectangles.

I would like to be able to use my keyboard shortcut in a Java application (ie Super_L+I for Up, Super_L+J for left etc.)

Please advise if you've encountered something similar.

PS: Super_L is the windows key

hbt

Posted 2010-07-08T08:05:59.847

Reputation: 1 371

FYI this is no longer an issue in ubuntu 14 and most likely related to env vars such as XMODIFIERS=@im=ibus – hbt – 2015-07-28T13:02:10.100

Might have come from a program that handled AWT events differently. This link https://github.com/chenkelmann/neo2-awt-hack might be useful in the future, but newer Java versions (and other UI libraries) don’t have this problem anymore. I had this problem too a few years ago.

– bugybunny – 2018-11-12T12:05:55.633

experiencing the same problem... – aioobe – 2011-03-10T12:06:43.003

I don't have a solution with xmodmap, but I did find an incredibly awkward and painful solution using xkb input files: http://superuser.com/questions/558598/how-can-i-make-my-iso-level5-shift-arrow-keys-work-in-java-swing-guis/558628#558628

– Owen – 2013-02-28T07:04:21.260

No answers