Help with Remapping Key 49 on German Keyboard Layout

Martin Ivanov marto1980 at gmail.com
Sun Apr 27 04:15:06 PDT 2025


Hello,

I'm trying to remap key 49 on my German keyboard layout to print the pipe
symbol (|) when pressed with Shift. I need this remapping because the key
that should normally print the pipe symbol (the key between the left Shift
and the 'Y' key on the German keyboard) is not working on my laptop
keyboard. In fact, even xev does not detect it being pressed at all.
Problem:

When I attempt to remap key 49 directly via xmodmap, the changes do not
take effect while the German layout is active. It seems that the key is
being overridden by the layout itself.
Workaround:

As a workaround, I’ve managed to successfully remap *key F1* with the
following line in my .Xmodmap:

keycode 67 = asciicircum bar

This works as expected, but I would prefer to remap *key 49* (the key
between left Shift and 'Y') instead of F1.
What I’ve Tried:

   -

   I switched the layout to us and remapped key 49, which worked as
   expected.
   -

   Switching back to de (German) and reapplying the xmodmap settings for
   key 49 did not work.
   -

   I attempted modifying the keymap using setxkbmap, but the change didn’t
   persist when using the German layout.

Question:

Is there a way to make *key 49* (the key between left Shift and 'Y' on the
German keyboard) work for the pipe symbol (|) in *X* without being
overridden by the layout? I understand there may be conflicts with the
German layout, but I’m hoping there’s a way to remap this key without
affecting the rest of my setup.

I’m specifically looking to remap this key, not F1, and would greatly
appreciate any suggestions or guidance on how to proceed.

Thank you for your help!

Best regards,
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20250427/6c61013f/attachment.htm>


More information about the Users mailing list