Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Feral

Q(FBSD): Want to make caps lock into esc.

This topic is 5532 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there I am trying to make it so that when I press caps lock it is exactly the same thing as pressing escape. Under Linux I believe this is via loadkeys. Under FreeBSD this would seem to be via `kbdcontrol -l` and a modified keymap file (thinking of basing off of `/usr/share/syscons/keymaps/us.pc-ctrl.kbd`), as I want to make backspace be backspace (and not delete which it currently is) this would seem like the best spot. A quick Google was not very helpfull though. Comments/suggestions welcome, of course Thank you, Feral

Share this post


Link to post
Share on other sites
Advertisement
(= Why is a good question really.

Mostly because of vim (esc gets hit alot), I have found that it is pretty handy outside of vim as well. An as I don''t use caps lock, I figure might as well make use of the key for something else

Share this post


Link to post
Share on other sites
You could just ''kbdcontrol -d KeyboardMap.Current'', ''cp KeyboardMap.Current KeyboardMap.Origional'', make your changes to Current, then ''kbdcontrol -l KeyboardMap.Current''.

I''m not sure, but I think you have to run the kbdcontrol commands from your console, you can''t ssh or telnet into the server to do it. You can then specify what Keyboard map you want to use in /etc/rc.conf. I think you would have to add the line ''keymap=/path/to/your/KeyboardMap.Current''. This will change that key for all system users though.

I guess you could also set a kbdcontrol -f and set a function key number as well instead of mapping it to your capslock.

Int.

Share this post


Link to post
Share on other sites
Ah that does sound like a better plan, thank you

It does look like it has to be console; term win in X no workie... soon as I can get out of here I''ll give it a try. ... Heh, I discovered a touch late that `portupgrade -rR python` results in a rather large dependancy download. Still, on the high side I think I''ve got most of gnome2 now, heh.

Share this post


Link to post
Share on other sites
Once I figure this out I''ll have something usefull to post. (*sigh* It''s giving me fits)

The program is xmodmap btw, though I''m not sure if that is the one and only.

Share this post


Link to post
Share on other sites
I am not sure (at all) if this is proper, but it does seem to work:

quote:
~/.xmodmaprc
remove lock = Caps_Lock
keysym Caps_Lock = Escape



quote:
~/.xinitrc
...
xmodmap ~/.xmodmaprc &
...
# start your WM of choice here.



I had a hell of a problem with this because I typoed xmodmap in ~/.xinitrc .. duh.

*edit some dork forgot to close his quote...*

[edited by - FeralofFireTop on August 29, 2003 11:36:43 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!