While working on my Debian box (which btw is a mix of Lenny and Squeeze), I
find that I type the underscore character ('_') more often than the dash
character ('-'). It could be file names, variable names while writing code
etc.,
Typing '_' involves holding the shift key while typing '-' does not involve
any. I am wondering if there is a way at the OS (or shell) level solution to
remap '-', '_' one to another so that typing '_' does not involve holding
shift key but typing '-' does.
Any ideas/comments/suggestions/pointers etc.,?
thanks
raju
--
Kamaraju S Kusumanchi
http://malayamaarutham.blogspot.com/
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: ibis8b$4dc$1@dough.gmane.org">http://lists.debian.org/ibis8b$4dc$1@dough.gmane.org
11-12-2010, 08:10 AM
Andrew Peng
map '-' to '_' and '_' to '-'
Hello!
Please take a look and see if this helps
http://www.columbia.edu/~djv/docs/keyremap.html
--Andrew
On Fri, Nov 12, 2010 at 2:02 AM, Kamaraju S Kusumanchi
<raju.mailinglists@gmail.com> wrote:
> While working on my Debian box (which btw is a mix of Lenny and Squeeze), I
> find that I type the underscore character ('_') more often than the dash
> character ('-'). It could be file names, variable names while writing code
> etc.,
>
> Typing '_' involves holding the shift key while typing '-' does not involve
> any. I am wondering if there is a way at the OS (or shell) level solution to
> remap '-', '_' one to another so that typing '_' does not involve holding
> shift key but typing '-' does.
>
> Any ideas/comments/suggestions/pointers etc.,?
>
> thanks
> raju
> --
> Kamaraju S Kusumanchi
> http://malayamaarutham.blogspot.com/
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: http://lists.debian.org/ibis8b$4dc$1@dough.gmane.org
>
>
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTin=8B+RcftWNkfJv6h1VaqxDkgfGP=5pnN_ssYC@mail .gmail.com">http://lists.debian.org/AANLkTin=8B+RcftWNkfJv6h1VaqxDkgfGP=5pnN_ssYC@mail .gmail.com
11-12-2010, 12:33 PM
Rob Owens
map '-' to '_' and '_' to '-'
On Fri, Nov 12, 2010 at 03:02:00AM -0500, Kamaraju S Kusumanchi wrote:
> While working on my Debian box (which btw is a mix of Lenny and Squeeze), I
> find that I type the underscore character ('_') more often than the dash
> character ('-'). It could be file names, variable names while writing code
> etc.,
>
> Typing '_' involves holding the shift key while typing '-' does not involve
> any. I am wondering if there is a way at the OS (or shell) level solution to
> remap '-', '_' one to another so that typing '_' does not involve holding
> shift key but typing '-' does.
>
Use xmodmap and/or a .Xmodmap file in your home directory. You man need
to use xev to find the keycodes.
-Rob
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20101112133310.GA26052@aurora.owens.net">http://lists.debian.org/20101112133310.GA26052@aurora.owens.net
11-12-2010, 07:38 PM
Mitchell Laks
map '-' to '_' and '_' to '-'
On 03:02 Fri 12 Nov , Kamaraju S Kusumanchi wrote:
> While working on my Debian box (which btw is a mix of Lenny and Squeeze), I
> find that I type the underscore character ('_') more often than the dash
> character ('-'). It could be file names, variable names while writing code
> etc.,
i have noticed the same thing. now if we all programmed in lisp this would not be a problem
I considered switching to common lisp from perl and C and C++ for this reason
Mitchell
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20101112203859.GC25103@earthlink.net">http://lists.debian.org/20101112203859.GC25103@earthlink.net
11-12-2010, 08:54 PM
Cameron Hutchison
map '-' to '_' and '_' to '-'
Rob Owens <rowens@ptd.net> writes:
>On Fri, Nov 12, 2010 at 03:02:00AM -0500, Kamaraju S Kusumanchi wrote:
>> While working on my Debian box (which btw is a mix of Lenny and Squeeze), I
>> find that I type the underscore character ('_') more often than the dash
>> character ('-'). It could be file names, variable names while writing code
>> etc.,
>>
>> Typing '_' involves holding the shift key while typing '-' does not involve
>> any. I am wondering if there is a way at the OS (or shell) level solution to
>> remap '-', '_' one to another so that typing '_' does not involve holding
>> shift key but typing '-' does.
>>
>Use xmodmap and/or a .Xmodmap file in your home directory. You man need
>to use xev to find the keycodes.
The X11 keysyms for these characters are "minus" and "underscore". If
you run "xmodmap -pke | grep underscore" you should see which keycode has
these keysyms mapped.
For me, this is:
$ xmodmap -pke | grep underscore
keycode 20 = minus underscore minus underscore
I suspect that's a standard keyboard keycode so you'll get the same
results, but run it anyway to be sure.
You can remap this like so:
$ xmodmap -e "keycode 20 = underscore minus underscore minus"
That swaps minus and underscore.
You can put the part between quotes in your ~/.Xmodmap file and GNOME
should auto-load it (although I think I remember reading something
lately that this may change).
Finally, I suggest you not do this. I've make changes to my standard
keyboard in the past and when you switch to someone elses keyboard you
just get annoyed :-) I used to map CapsLock to Ctrl, but if you get too
used to that, YOU JUST END UP SHOUTING when you only meant to press
Ctrl.
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 5b5d.4cddb78d.c66fd@getafix.xdna.net">http://lists.debian.org/5b5d.4cddb78d.c66fd@getafix.xdna.net
11-13-2010, 08:26 PM
Kamaraju S Kusumanchi
map '-' to '_' and '_' to '-'
Cameron Hutchison wrote:
> The X11 keysyms for these characters are "minus" and "underscore". If
> you run "xmodmap -pke | grep underscore" you should see which keycode has
> these keysyms mapped.
>
> For me, this is:
> $ xmodmap -pke | grep underscore
> keycode 20 = minus underscore minus underscore
>
> I suspect that's a standard keyboard keycode so you'll get the same
> results, but run it anyway to be sure.
>
> You can remap this like so:
> $ xmodmap -e "keycode 20 = underscore minus underscore minus"
>
> That swaps minus and underscore.
Yes. This works and it is just great. Is there a solution when the machine
does not run X?
thanks
raju
--
Kamaraju S Kusumanchi
http://malayamaarutham.blogspot.com/
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: ibmvp2$v9t$1@dough.gmane.org">http://lists.debian.org/ibmvp2$v9t$1@dough.gmane.org
11-14-2010, 01:30 AM
Ron Johnson
map '-' to '_' and '_' to '-'
On 11/12/2010 02:38 PM, Mitchell Laks wrote:
On 03:02 Fri 12 Nov , Kamaraju S Kusumanchi wrote:
While working on my Debian box (which btw is a mix of Lenny and Squeeze), I
find that I type the underscore character ('_') more often than the dash
character ('-'). It could be file names, variable names while writing code
etc.,
i have noticed the same thing. now if we all programmed in lisp this would not be a problem
Or COBOL...
I considered switching to common lisp from perl and C and C++ for this reason
--
Seek truth from facts.
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Kamaraju S Kusumanchi <raju.mailinglists@gmail.com> writes:
>Yes. This works and it is just great. Is there a solution when the machine
>does not run X?
I don't know the specific incantations, but it should be possible with
loadkeys(1) from the console-tools package.
The man pages for dumpkeys(1) and keymaps(5) will probably be necessary
reading.
From: Cameron Hutchison <lists@xdna.net>
Newsgroups: gmane.linux.debian.user
Subject: Re: map '-' to '_' and '_' to '-'
References: <ibis8b$4dc$1@dough.gmane.org> <20101112133310.GA26052@aurora.owens.net> <5b5d.4cddb78d.c66fd@getafix.xdna.net> <ibmvp2$v9t$1@dough.gmane.org>
Kamaraju S Kusumanchi <raju.mailinglists@gmail.com> writes:
>Yes. This works and it is just great. Is there a solution when the machine
>does not run X?
I don't know the specific incantations, but it should be possible with
loadkeys(1) from the console-tools package.
The man pages for dumpkeys(1) and keymaps(5) will probably be necessary
reading.
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 400d.4cdfb349.523c7@getafix.xdna.net">http://lists.debian.org/400d.4cdfb349.523c7@getafix.xdna.net