I want to switch Control and Command modifier keys in GNOME / Debian Jessie, because I use a Macintosh laptop.I have managed to get these changed via the TweakTool -> Typing panel, like this:Ctrl key position -> Left Ctrl as MetaAlt/Win key behaviour -> Ctrl is mapped to Win keys (and the usua..)But this introduces a new weird problem with the Alt key, that I can at least witness in JVM applications, e.g. IntelliJ IDEA: It is not possible any longer to use any keyboard shortcut that uses the Alt modifier.For example the following prints the reported modifiers:import javax.swing._import java.awt.event.{InputEvent, KeyEvent}val f = new JFrameval p = new JPanel(new java.awt.GridLayout(3,1))f.setContentPane(p)val ls = Array.fill(3)(new JLabel(-))ls.foreach(p.add)p.addKeyListener {  new java.awt.event.KeyAdapter {    def apply(i: Int, e: KeyEvent): Unit =       ls(i).setText(InputEvent.getModifiersExText(e.getModifiersEx))    override def keyPressed (e: KeyEvent): Unit = apply(0, e)    override def keyReleased(e: KeyEvent): Unit = apply(1, e)    override def keyTyped   (e: KeyEvent): Unit = apply(2, e)  }}f.setSize(200, 200)f.setVisible(true)p.requestFocus()When I press down the Alt key, it is reported as such. But as soon as I press the additional key, e.g. Alt+A, both the pressed, typed and released modifier mask is simply changed to Meta. If I release the additional key first, then Alt, the reported mask on Alt release is Meta+Alt.In any case, the expected behaviour is that Alt reporting is not changed at all. Since my development environment (IntelliJ IDEA) as well as many other applications make heavy use of Alt based shortcuts, I need to get this behaviour fixed. The bug is linked to the first setting (Ctrl key position), as soon as I disable it, Alt goes back to normal.So is this a bug in Linux/GNOME? In OpenJDK (Alt still works normally in for example Iceweasel/Firefox)?Is there an alternative way to flip Ctrl and Command without affecting the Alt keys?
Flipping Control/Command in GNOME breaks Alt key in JVM
gnome;java;keyboard layout;macintosh;intellij