<div dir="ltr"><p class="gmail-">Hello,</p><p class="gmail-">I'm trying to remap key 49 on my German keyboard layout to print the pipe symbol (<code>|</code>) 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 <code>xev</code> does not detect it being pressed at all.</p><h3 class="gmail-">Problem:</h3><p class="gmail-">When I attempt to remap key 49 directly via <code>xmodmap</code>, the changes do not take effect while the German layout is active. It seems that the key is being overridden by the layout itself.</p><h3 class="gmail-">Workaround:</h3><p class="gmail-">As a workaround, I’ve managed to successfully remap <strong>key F1</strong> with the following line in my <code>.Xmodmap</code>:</p><pre class="gmail-overflow-visible!"><div class="gmail-contain-inline-size gmail-rounded-md gmail-border-[0.5px] gmail-border-token-border-medium gmail-relative gmail-bg-token-sidebar-surface-primary"><div class="gmail-sticky gmail-top-9"><div class="gmail-absolute end-0 gmail-bottom-0 gmail-flex gmail-h-9 gmail-items-center gmail-pe-2"><div class="gmail-bg-token-sidebar-surface-primary gmail-text-token-text-secondary gmail-dark:bg-token-main-surface-secondary gmail-flex gmail-items-center gmail-rounded-sm gmail-px-2 gmail-font-sans gmail-text-xs"><span style="font-family:Arial,Helvetica,sans-serif">keycode 67 = asciicircum bar</span><br></div></div></div></div></pre><p class="gmail-">This works as expected, but I would prefer to remap <strong>key 49</strong> (the key between left Shift and 'Y') instead of F1.</p><h3 class="gmail-">What I’ve Tried:</h3><ul>
<li class="gmail-">
<p class="gmail-">I switched the layout to <code>us</code> and remapped key 49, which worked as expected.</p>
</li>
<li class="gmail-">
<p class="gmail-">Switching back to <code>de</code> (German) and reapplying the <code>xmodmap</code> settings for key 49 did not work.</p>
</li>
<li class="gmail-">
<p class="gmail-">I attempted modifying the keymap using <code>setxkbmap</code>, but the change didn’t persist when using the German layout.</p>
</li>
</ul><h3 class="gmail-">Question:</h3><p class="gmail-">Is there a way to make <strong>key 49</strong> (the key between left Shift and 'Y' on the German keyboard) work for the pipe symbol (<code>|</code>) in <strong>X</strong> 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.</p><p class="gmail-">I’m specifically looking to remap this key, not F1, and would greatly appreciate any suggestions or guidance on how to proceed.</p><p class="gmail-">Thank you for your help!</p><p class="gmail-">
</p><p class="gmail-">Best regards,<br>
Martin</p><p class="gmail-"><br></p></div>