Remapping Microsoft Sculpt Ergonomic Keyboard with Karabiner Elements (2023 guide, MacOS 13.6 Ventura)
- Remapped the "Windows" key and "Context Menu" key.
- Remapped the whole bottom row to match MacBook Pro keyboard layout.
let md5 = str => require('crypto').createHash('md5').update(str).digest("hex") |
On MacOS, cmd-tab
only toggles between different apps. To toggle between different windows of the same app, you need to use cmd-`
. However this is cumbersome for regular usage, as it requires stretching your fingers unnaturally. This rule allows to use cmd-CapsLock
instead, which is much easier.
cd ~/.config/karabiner/assets/complex_modifications
and put the json file below there$ jq --version | |
jq-1.6 | |
--- | |
bash-3.2$ jq --null-input --compact-output --raw-output --monochrome-output --arg test 'A\nB' '{test: $test}' | |
{"test":"A\\nB"} | |
bash-3.2$ OUT=$(jq --null-input --compact-output --raw-output --monochrome-output --arg test 'A\nB' '{test: $test}'); echo $OUT | |
{"test":"A\\nB"} | |
git log --since="27 SEP 2021" --until="28 SEP 2021" --pretty='%ci %h %s %cn %ce ' | grep 'Merge pull' | |
# 2021-09-27 19:22:53 +0200 2bd0ea1b765 Merge pull request #123 from org/repo GitHub [email protected] |
import * as fsp from 'fs/promises'; | |
import { dirname } from 'path'; | |
import { fileURLToPath } from 'url'; | |
// eslint-disable-next-line no-underscore-dangle | |
const __dirname = dirname(fileURLToPath(import.meta.url)); | |
const dirNameLen = __dirname.length; | |
const file = await fsp.readFile('../trace.json'); | |
const trace = JSON.parse(file); |
Disable settings that prevent the Mac from sleeping or let it wake up overnight in your backpack and drain half of battery.
On top of those, it's probably best to not leave any USB thing plugged to the Mac before putting it to sleep (including YubiKeys).
sudo pmset -a hibernatemode 25
Action | Shortcut |
---|---|
Show hover infobox | cmd-k,cmd-i |
.js
to .ts
module.exports =
to export =
exports.foobar =
to export const foobar =
require
calls to static import
.