Skip to content

Instantly share code, notes, and snippets.

@moritzWa
moritzWa / hyper-shift-enter-plugin.md
Created February 10, 2026 19:36
Fix Shift+Enter for Claude Code multi-line input in Hyper terminal (xterm.js plugin)

Fix Shift+Enter for Claude Code (and other CLI tools) in Hyper Terminal

The Problem

Hyper terminal (powered by xterm.js) sends the same byte (\r, carriage return) for both Enter and Shift+Enter. This means Shift+Enter can't insert a newline in Claude Code's multi-line input - it just submits instead.

Other terminals like iTerm2, Kitty, Ghostty, and Alacritty either handle this natively or have simple config options. Hyper doesn't, but a small local plugin fixes it.

The Fix

@moritzWa
moritzWa / adnw-karabiner-rules.md
Last active February 9, 2026 01:31
Workaround: Chrome Cmd+Shift+T not working with custom keyboard layouts (ADNW/Neo2) + Karabiner

Karabiner-Elements rules for Deutsch (ADNW) keyboard layout on macOS

Fixes and ergonomic shortcuts for using the ADNW keyboard layout on macOS with Karabiner-Elements.

Problem

Custom keyboard layouts like ADNW define a command keymap that remaps keys when Cmd is held. This causes issues:

  • Chrome's Cmd+Shift+T (Reopen Closed Tab) breaks because keycode 17 maps to a-umlaut instead of t in ADNW's command keymap
  • Other shortcuts need remapping to match ADNW's ergonomic key positions
@moritzWa
moritzWa / beautiful_google-colab.css
Created February 18, 2021 11:29
Make colab.research.google.com beautiful
div.inputarea.horizontal.layout.code {
border-radius: 10px !important;
}
.main-content[elevation="2"] {
border-radius: 10px !important;
}
.code.focused .cell-gutter {
@moritzWa
moritzWa / hashTable.js
Created March 17, 2020 08:54
JavaScript Hashtable Implementation
function hashStringToInt(s, tableSize) {
let hash = 17
for (let i = 0; i < s.length; i++) {
hash = (13 * hash * s.charCodeAt(i)) % tableSize
}
return hash
}