键盘F1与游戏键盘按键冲突突,怎么办

求问下我的F1按键怎么突然不能用了 我确定键盘没有坏
如题........
我也是额。。在网吧就不能用。。自己电脑就好好的。。不知道为什么[s:ac:愁]
[b]Reply to [pid=42375,1]Reply[/pid] Post by [uid=]会思想的便便[/uid] ( 01:09)[/b]刚刚还好好的 突然就不能用了
是不是浏览器或者聊天工具的快捷按键冲突了?
游戏最小化 再最大化试试
把其他软件全部关掉再恢复默认按键设置包你好使
我记得我之前在网吧是,qq浏览器关了,后台进程也关了就行了
借楼问一下 我最近用的一台笔记本 F1到F12都没办法在游戏里用 有什么办法解决吗
[b]Reply to [pid=42375,1]Reply[/pid] Post by [uid=]vinden[/uid] ( 07:22)[/b]你不会开了fn功能吧。。。。
我遇到一种情况,在切换输入法时按键全变了,后来发现是按了shift就会出问题。
会不会是卡 CTRL 了,按几次CTRL试试Android_控件相关(18)
Android(209)
在做发帖功能的时候,一般都会用到表情,当在输入法键盘显示的情况下,点击显示表情键盘的按钮,如果只是简单的setVisibility,同时隐藏输入法,这时表情键盘会被往上弹出,这个效果就让使用体验不太友好。
我的解决方案是:在输入法键盘完全隐藏后,再将表情键盘显示。
1、在xml布局中的最底部加一个View,高度为0,用来在代码中判断该view的y坐标是否大于或等于屏幕的高度,如果是,这表明输入法完全隐藏;
2、通过mainLinearLayout.getViewTreeObserver().addOnGlobalLayoutListener 来监听整个布局的视图高度,判断输入法是否完全隐藏就在这里面操作。
下面代码不太完整,只是用来大概展示思路:
&?xml version=&1.0& encoding=&utf-8&?&
&com.hmy.view.ResizeLayout xmlns:android=&/apk/res/android&
android:id=&@+id/mainLinearLayout&
android:layout_width=&match_parent&
android:layout_height=&match_parent&
android:background=&@android:color/white&
android:orientation=&vertical&&
&FrameLayout
android:id=&@+id/content_layout&
android:layout_width=&match_parent&
android:layout_height=&match_parent&
android:layout_below=&@id/head_layout&&
&RelativeLayout
android:layout_width=&match_parent&
android:layout_height=&match_parent&&
android:id=&@+id/bottom&
android:layout_width=&match_parent&
android:layout_height=&35dp&
android:layout_alignParentBottom=&true& /&
&!-- 编辑框 --&
android:id=&@+id/titleEditText&
android:layout_width=&match_parent&
android:layout_height=&match_parent&
android:layout_marginTop=&1.5dp&&&/EditText&
&/RelativeLayout&
&LinearLayout
android:id=&@+id/bottom_layout&
android:layout_width=&match_parent&
android:layout_height=&wrap_content&
android:layout_gravity=&bottom&
android:background=&#F1F1F1&
android:orientation=&vertical&&
&!-- 底部功能条,表情按钮在这里面 --&
&include layout=&@layout/view_toolbtn& /&
&!-- 表情键盘,默认为gone --&
&include layout=&@layout/view_emoji& /&
&!-- 这个View就是用来标记输入法位置的 --&
android:id=&@+id/keyboard_place_view&
android:layout_width=&match_parent&
android:layout_height=&0dp& /&
&/LinearLayout&
&/FrameLayout&
&/com.hmy.view.ResizeLayout&
注:如果不知道ResizeLayout是什么,百度一下吧。
下面是核心代码,代码不完整,只提供思路:
private ResizeLayout mainLinearL
private View mKeyBoardPlaceV
mainLinearLayout = (ResizeLayout) findViewById(R.id.mainLinearLayout);
mKeyBoardPlaceView = findViewById(R.id.keyboard_place_view);
private void setKeyBoardListener() {
mainLinearLayout.getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
public void onGlobalLayout() {
if (mIsShowExpression) { // mIsShowExpression 在表情按钮的onClick事件中切换true或false
int[] location = new int[2];
mKeyBoardPlaceView.getLocationOnScreen(location);
// mScreenHeight 是屏幕高度,在这之前获取
if (location[1] &= mScreenHeight) {
// linearLayoutExpression 是表情键盘
linearLayoutExpression.setVisibility(View.VISIBLE);
好啦,就是这么多。如果你有更好的方式,望赐教。
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:158347次
积分:2403
积分:2403
排名:第13393名
原创:49篇
转载:197篇
评论:40条
(1)(1)(2)(4)(3)(1)(2)(9)(1)(1)(1)(5)(1)(5)(14)(19)(17)(14)(21)(15)(86)(21)(2)

我要回帖

更多关于 怎么测试键盘按键冲突 的文章

 

随机推荐