DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 8th January 2024
Nixota Nixota is offline
Port Guard
 
Join Date: Aug 2022
Posts: 15
Default [SOLVED] keyboard/keys mapping: switch 'Caps Lock' with 'Esc'

Hello everyone,

I tried to set up the behavior of the vim editor so that the 'Caps Lock' key works as the 'Esc' key.

I followed the link:
https://www.openbsd.org/faq/faq7.html#Consoles

...and used the hint:
Quote:
Remap [Caps Lock] to be [Control L], the left control key:
# wsconsctl keyboard.map+="keysym Caps_Lock = Control_L"
To make changes permanent, use the wsconsctl.conf(5) file.
...and set the /etc/wsconsctl.conf file as:

keyboard.map+="keysym Caps_Lock = Escape"

the correct keysym-related keys names are taken from here:
https://man.openbsd.org/xmodmap

[SOLUTION] by rebooting the OS the new config rules are accepted.

(addendum) apparently, it's possible to achieve the same through CLI to make 'Caps Lock' an additional 'ESC', using the command:

$ xmodmap caps:escape

read at this link:
https://man.openbsd.org/xkeyboard-co...k_key_behavior

B.R.

Last edited by Nixota; 8th January 2024 at 11:01 AM.
Reply With Quote
  #2   (View Single Post)  
Old 8th January 2024
Onauk's Avatar
Onauk Onauk is offline
Real Name: Thomas
Fdisk Soldier
 
Join Date: Jan 2023
Location: France
Posts: 71
Default

The process of mapping the Caps Lock key as Left Control can be interesting even for vim users since Ctrl+[ acts the same as Esc. With this you obtain a new Control key which might be more useful than an Escape key.
Reply With Quote
Reply

Tags
keys swap keyboard


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenBSD - 0 mapping aimeec1995 OpenBSD General 3 25th September 2017 04:58 PM
Microsoft has released a Debian Linux switch OS. Repeat, a Debian Linux switch OS J65nko News 9 12th March 2016 11:58 PM
Vi keyboard mapping?? dirty_hammer NetBSD General 3 19th December 2015 05:19 AM
Data caps a "crude and unfair tool" for easing online congestion J65nko News 0 4th December 2011 09:33 PM
is caps not allowed? ephemera Feedback and Suggestions 5 9th July 2009 07:31 PM


All times are GMT. The time now is 10:38 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick