让NumLock自动打开!
时间:2003-09-30
来源:互联网
方法一:KDE环境下:
KDE控制中心(Control Center) --> 外设(Peripherals) --> 键盘(Keyboard) -->KDE启动时NumLock的状态设置为打开
方法二:WindowMaker下:
1) 保存上面的代码为 numlock.c
2).gcc -I/usr/X11R6/include -L/usr/X11R6/lib -o setnumlock numlock.c -lX11 -lXtst
3).编辑 .xinitrc 或者 .xsession 在里面加入如下内容
/usr/X11R6/bin/setnumlock
方法三:修改/etc/X11/XF86Config:
在Keyboard 段加入:
# Let the server do the NumLock processing. This should only be
# required when using pre-R6 clients
ServerNumLock
KDE控制中心(Control Center) --> 外设(Peripherals) --> 键盘(Keyboard) -->KDE启动时NumLock的状态设置为打开
方法二:WindowMaker下:
代码:
#include </usr/X11R6/include/X11/extensions/XTest.h> #include </usr/X11R6/include/X11/keysym.h> int main(void) { Display* disp = XOpenDisplay(NULL); if (disp == NULL) return 1; XTestFakeKeyEvent(disp, XKeysymToKeycode(disp, XK_Num_Lock), True, CurrentTime); XTestFakeKeyEvent(disp, XKeysymToKeycode(disp, XK_Num_Lock), False, CurrentTime ); XCloseDisplay(disp); return 0; }
2).gcc -I/usr/X11R6/include -L/usr/X11R6/lib -o setnumlock numlock.c -lX11 -lXtst
3).编辑 .xinitrc 或者 .xsession 在里面加入如下内容
/usr/X11R6/bin/setnumlock
方法三:修改/etc/X11/XF86Config:
在Keyboard 段加入:
# Let the server do the NumLock processing. This should only be
# required when using pre-R6 clients
ServerNumLock
作者: Freebird 发布时间: 2003-09-30
哈,不错,回去弄弄看看灵验不~~
作者: malen 发布时间: 2003-10-18
第三种方法不灵:(
作者: malen 发布时间: 2003-10-21
Another way:Inatall the numlockx from ports.
#cd /usr/ports/x11/numlockx
#make install distclean
This little thingy allows you to start X with NumLock turned on ( which is a feature that a lot of people seem to miss and nobody really knew how to achieve this ).
#cd /usr/ports/x11/numlockx
#make install distclean
This little thingy allows you to start X with NumLock turned on ( which is a feature that a lot of people seem to miss and nobody really knew how to achieve this ).
作者: Freebird 发布时间: 2003-11-29
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28