On Thu, Nov 25, 2010 at 02:33 PM, SanskritFritz said:
> I have fought with this problem for a while, but went the other
> direction (disabling the alt-left/right keys in the console), can you
> maybe help me with this?
> https://bbs.archlinux.org/viewtopic.php?id=101863

Note A: I encourage you to switch to using ctrl-left/right for Fish and
keep alt-left/right reserved for switching vconsoles.  But either way,
you will need to use loadkeys to get $meta + left/right working with
Fish in the vconsoles.  I encourage this because, as you've discovered,
it is harder to change the vconsole keybindings so when you work on a
different machine or someone works on your machine, you will be
creating unneeded surprises that I can't fix without the help of Google.
These are usually emergency situations where you want as few surprises
as possible and a surprise like this can lead you down the wrong path.
I speak from experience, having previously taken the route you want to
follow.


Note B: the dumpkeys and loadkeys commands must be run from within a
vconsole. They won't work inside of X.


Step 0: Switch to a vconsole


Step 1: Create a copy of your current keymap:

    $ cd                          # or create a directory to hold your
                                  # keymap file and cd to it
    $ dumpkeys > defkeymap.orig
    $ cp defkeymap.orig custom-keymap


Step 2: Edit custom-keymap

    2.a: Change every instance of Decr_Console to Meta_b
    2.b: Change every instance of Incr_Console to Meta_f


Step 3: Save the file and load the new keymap

    $ sudo loadkeys custom-keymap

you can undo your changes with:

    $ sudo loadkeys defkeymap.orig


Step 4) Make your changes permanent

I suggest grep'ing around /etc/init.d to see if there is a startup
script that loads a keymap for you.  In Gentoo it is /etc/init.d/keymaps
in Debian based Mepis & antiX it is /etc/init.d/keymaps.sh.  The Gentoo
script gets its data from /etc/conf.d/keymaps.

I tend to keep my custom keymap in /usr/share/keymaps/


Note C: If you instead want to have ctrl-left/right work in Fish in the
vconsoles then don't delete any lines from custom-keymap and instead
add the lines (leading tabs, not spaces):

    control keycode 105 = Meta_b
    control keycode 106 = Meta_f


Note D: I've only used Meta_b and Meta_f once on one machine.  I found
them by experimenting.  YMMVG.


Peace, James


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to