Xmodmap arrow keys not working in intellij idea

Greetings

I'm trying for the first time intellij idea after some years working with eclipse. My overall opinion is that is better especially for Presentation layer (I work with richfaces over seam). For better productivity I changed some of my keys so I can have the arrow keys in j,k,l and i when combining those with super key. I used xmodmap for doing so. The problem that I have is that it doesn't work in idea. It works perfectly in eclipse. I could manually add those shortcuts to intellij idea but doing so it wont make them work in context menus (for autocomplete for example). I wonder if anybody had this issue. It's kind of a bummer becaus I'm used to use those shortcuts in every software I use.

Regards
Jose Domingues

5 comments
Comment actions Permalink

hi guy, you resolve it ,now . i have this problem  too.

0
Comment actions Permalink

Hey wassap.

Basicly I made a python script the hears events from keyboard.

In my case I used /dev/input/by-path/platform-i8042-serio-0-event-kbd because I'm on linux. I have a script that clears super key functionallity and gives permissions in /dev/input.

#!/bin/sh
xmodmap -e "keycode 134 = "
xmodmap -e "keycode 133 = "
xmodmap -e "keycode 206 = "
sudo chmod +rw -R /dev/input



Then I have a python script that listens to events from keyboard and detects if the super key is pressed down. When key down is detected it runs a bash script that changes my keyboard to arrows. When key up is detected it runs another one that puts the keyboard back.

/* python script */

import subprocess
from evdev import InputDevice, ecodes

dev = InputDevice('/dev/input/by-path/platform-i8042-serio-0-event-kbd')

for event in dev.read_loop():
    if event.type == ecodes.EV_KEY:
        if event.code == 125:
            if event.value == 1:
                subprocess.call(["/home/bruno/keycontrol/keyShiftArrows"])
            elif event.value == 0:
                subprocess.call(["/home/bruno/keycontrol/keyShiftLetters"])



/* bash scripts for changing keys = keyShiftArrows*/
#!/bin/bash

  xmodmap -e "keycode 31 = Up Up Up Up Up"
  xmodmap -e "keycode 45 = Down Down Down Down Down"
  xmodmap -e "keycode 44 = Left Left Left Down Left "
  xmodmap -e "keycode 46 = Right Right Right Down Right"
  xmodmap -e "keycode 30 = Home Home Home Home Home"
  xmodmap -e "keycode 32 = End End End End End"
  xmodmap -e "keycode 33 = Prior Prior Prior Prior Prior"
  xmodmap -e "keycode 47 = Next Next Next Next Next"


/* bash scripts for changing keys = keyShiftLetters*/
#!/bin/bash

  xmodmap -e "keycode 31 = i I i I Up Up Up"
  xmodmap -e "keycode 45 = k K k K Down Down Down"
  xmodmap -e "keycode 44 = j J j J Left Left Left"
  xmodmap -e "keycode 46 = l L l L Right Right Right"
  xmodmap -e "keycode 30 = u U u U Home Home Home"
  xmodmap -e "keycode 32 = o O o O End End End"
  xmodmap -e "keycode 33 = p P p P Prior Prior Prior"
  xmodmap -e "keycode 47 = ccedilla Ccedilla ccedilla Ccedilla Next Next Next"



Don't forget that you need evdev libraries. Also when you launch python script do it as daemon = python keyShiftScript.py &

Hope it helps :-)
0
Comment actions Permalink

Hello,

I had similiar problem and used Jose solution. What's more I have usually plugged two keyboards, so I added thread per event device. It looks like Jose doesn't use qwerty layout, so I changed it to qwerty. I also made a github repo with it: https://github.com/kozikow/cmdhjkl-linux .

0
Comment actions Permalink

Cool. I didnt even remember this anymore. I'm glad it was usefull :-) Your implementation looks really neat.

ps: It's querty however its a portuguese layout keyboard that is why some keys are different :p

0
Comment actions Permalink

I still experience this bug with CLion beta 2017.2.2 (and all other Intellij products too I'm sure). Have you found any other work-around in the last few years?

0

Please sign in to leave a comment.