Ubuntu环境下Intellij Idea中键盘失效

来源:互联网 发布:淘宝宝贝详情模板代码 编辑:程序博客网 时间:2024/05/29 05:00
问题描述:
Ubuntu环境下,Intellij Idea中键盘失效,即按下任何按键都没有反应。
使用鼠标能够进行正常操作。


解决方案:
Ubuntu环境下,默认安装了IBUS软件,这个问题就是由IBUS引起的。
那么解决方案就是在idea中不使用IBUS就好了,我们可以借助于“XMODIFIERS”环境变量
该变量的定义如下:
To use XIM (X input method) server, users should set XMODIFIERS 
environment variable. 
For example, to use "ibus", users should set like 'XMODIFIERS="@im=ibus"'. 


如果不需要使用中文输入法,那么现在可以设置"XMODIFIERS=idea.sh",然后把上面这行设置语句加到idea.sh脚本的"Run the IDE."语句前面就好

如果需要使用中文输入法,那么现在可以设置"XMODIFIERS=“@im=fcitx”",然后把上面这行设置语句加到idea.sh脚本的"Run the IDE."语句前面就好



设置好的idea.sh部分内容如下:

XMODIFIERS=idea.sh #add this lineexport XMODIFIERS  #add this line too# ---------------------------------------------------------------------# Run the IDE.# ---------------------------------------------------------------------while true ; do  eval "$JDK/bin/java" $ALL_JVM_ARGS -Djb.restart.code=88 $MAIN_CLASS_NAME "$@"  test $? -ne 88 && breakdone


参考文献:
[1]http://askubuntu.com/questions/501907/keyboard-locks-in-intellij-idea-on-ubuntu-14-04
[2]https://youtrack.jetbrains.com/issue/IDEA-78860
[3]https://lists.debian.org/debian-devel/2004/09/msg00380.html
0 0
原创粉丝点击