On Mon, Oct 13, 2025 at 10:54:55AM +0300, Divan Santana wrote:
> Crystal Kolipe <[email protected]> writes:
> 
> > On Thu, Oct 09, 2025 at 12:50:46PM +0300, Divan Santana wrote:
> >> Greetings :)
> >> 
> >> Do you know if there is a native way in openbsd to make the enter key
> >> double as a mod like super? (not using xcape)
> >
> > Yes, you can do it with xmodmap.
> >
> > For example, to keep normal functionality of enter but make shift-enter into
> > another control key:
> >
> > keycode  36 = Return Control_L Return Control_L
> > add Control = Control_L
> >
> > Note that you need the 'add Control' line, just adding the Control_L keysym 
> > to
> > the keycode isn't enough.
> 
> Thanks.  I guess I should have mentioned not with xcape or xmodmap
> either.
> 
> I was hoping to achieve this at a lower level like in wsconsctl.conf for
> two reasons:
> 
> - xcape/xmodmap have performance issues in emacs exwm
>   https://github.com/emacs-exwm/exwm/wiki#issues-with-xmodmap
> - xcape/xmodmap don't apply system wide.  Alternatives that work well on
>   Linux is kmonad etc, but I can't seem to find something similar on
>   openbsd.

For X11, your best option for lower level configuration would be to look at
/usr/X11R6/bin/setxkbmap.

For use on the console you can just use something like:

wsconsctl keyboard.map+="Keycode 28 = Control_L"

But this won't affect the keycodes that X11 receives.

Reply via email to