QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2663|回复: 7

[原创]配置左手用小鼠

[复制链接]
发表于 2003-12-7 17:44:33 | 显示全部楼层 |阅读模式
哈哈总算把Debian Linux装好了,自已编译的2.4.22的核心加上WindowMaker再加上nvidia的驱动,启动从开机到见到xdm的界面,只要30秒:)好快乐。
可是,我是习惯用左手的鼠标,WindowMaker的图形的配置很弱。我想要的是把左右键调过来。

ok,总算找到了方法:)给习惯用左手的朋友共享

xmodmap -e "pointer = 3 2 1 4 5"

可以把鼠标的键调过来(原来是 1 2 3 4 5的顺序)我用的是三键加滚轮的鼠标。

如果你的鼠标不同的话,要改改,就是要把3(right)和1(换过来)。

ok,那总不能每次都输入吧

写个文件放在 ~/.xmodmaprc
       pointer = 3 2 1 4 5
后改 ~/.xsession
     xmodmap ~/.xmodmaprc

就可以了:)
发表于 2004-3-20 11:01:09 | 显示全部楼层
强!
改天也开始用左手,
呵呵,我现在已经是左手刷牙了
开发右脑
回复

使用道具 举报

发表于 2004-7-27 16:13:48 | 显示全部楼层
嘿嘿
我试一试去  
回复

使用道具 举报

发表于 2004-7-27 16:44:57 | 显示全部楼层
呵呵, 我也来加点东西.

如果要鼠标指针指向右边可用如下命令

xsetroot -cursor_name right_ptr

相应的指向左边

xsetroot -cursor_name left_ptr
回复

使用道具 举报

发表于 2004-8-2 21:12:49 | 显示全部楼层
great !
回复

使用道具 举报

发表于 2006-5-16 14:19:38 | 显示全部楼层
为什么我的不可以呢:
linux:/home/xxdaystar # xmodmap --help
usage:  xmodmap [-options ...] [filename]

where options include:
    -display host:dpy            X server to use
    -verbose, -quiet             turn logging on or off
    -n                           don't execute changes, just show like make
    -e expression                execute string
    -pm                          print modifier map
    -pk                          print keymap table
    -pke                         print keymap table as expressions
    -pp                          print pointer map
    -grammar                     print out short help on allowable input
    -                            read standard input

linux:/home/xxdaystar # xmodmap -e "pointer=3 2 1 4 5"
xmodmap:  unknown command on line commandline:0
xmodmap:  1 error encountered, aborting.
linux:/home/xxdaystar # xmodmap -e "pointer=32145"
xmodmap:  unknown command on line commandline:0
xmodmap:  1 error encountered, aborting.

suse10的系统,殷切等待回答
回复

使用道具 举报

发表于 2006-5-16 18:04:15 | 显示全部楼层
这是X11下xmodmap文件的内容:

!! ~/.Xmodmap
!!
!! Use this as a template for $HOME/.Xmodmap
!!
!! The leading `!' is the comment sign.
!!
!! Please note: the natural way to assign keys are their keycodes.
!! The only problem is, that keycodes do depend on the architecture,
!! therefore keysymbols are used herein.  This has the disadvantage
!! that this file can only be called once with the program xmodmap.
!! To get keycodes of the keys use the program xev.
!! The system Xmodmap is /usr/X11R6/lib/X11/Xmodmap, have a look.

!! First example: Swap control key with caps lock key just like on
!! lk401 from DEC or type 4 from Sun Microsystems
!remove Lock      = Caps_Lock
!remove Control   = Control_L
!keysym Caps_Lock = Control_L
!keysym Control_L = Caps_Lock
!add    Lock      = Caps_Lock
!add    Control   = Control_L

!! Second example: Make left Alt key to left Meta key
!! Note that afterwards no key is assigned anymore to the symbol Alt_L.
!clear  Mod1
!keysym Alt_L = Meta_L
!add    Mod1  = Meta_L

!! Third example: Change right Control key to Compose key.
!! To do Compose Character, press this key and afterwards two
!! characters (e.g. `a' and `^' to get �.
!remove  Control  = Control_R
!keysym Control_R = Multi_key
!add     Control  = Control_R

!! Fourth example: Make Menu key on WIN95 keyboard doing Compose
!keysym Menu = Multi_key

!!
!! End of ~/.Xmodmap


这是终端下xmodmap:

xxdaystar@linux:~> xmodmap
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x6d)
mod1        Alt_L (0x40),  Alt_L (0x7d),  Meta_L (0x9c)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x73),  Super_R (0x74),  Super_L (0x7f),  Hyper_L (0x80)
mod5        Mode_switch (0x5d),  ISO_Level3_Shift (0x7c)
回复

使用道具 举报

发表于 2006-5-18 07:55:02 | 显示全部楼层
感谢大家,已经弄好了,粗心没注意空格,应该是
xmodmap -e "pointer = 3 2 1 4 5"
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-2 00:13 , Processed in 0.045467 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表