How to type home, end, insert, delete on the Reform keyboard?

So, after following the XKB configuration rabbit hole for a while, I’ve ended up with the following settings:

xkb_keymap {
    xkb_keycodes { include "evdev+aliases(qwerty)" };

    xkb_types {
        include "complete"
        virtual_modifiers Hyper;
        type "HYPER" {
            modifiers = Hyper;
            map[Hyper] = Level2;
            level_name[Level1] = "Base";
            level_name[Level2] = "Hyper";
        };
    };

    xkb_compat { include "complete" };

    xkb_symbols {
        include "pc+us+inet(evdev)"
        include "compose(menu)"
        
        key <RWIN> { [ Hyper_L ] };
        modifier_map Mod5 { <HYPR> };
        
        key <LEFT> {
            type = "HYPER",
            symbols[Group1] = [ Left, Home ]
        };
        
        key <RGHT> {
            type = "HYPER",
            symbols[Group1] = [ Right, End ]
        };
        
        key <RTRN> {
            type = "HYPER",
            symbols[Group1] = [ Return, Insert ]
        };
    };

    // xkb_geometry  { include "pc(pc105)" };
};

This maps Hyper+Left/Right to HOME and END and unmaps Hyper from existing Super keybindings by remapping it to Mod5. Additionally, compose key on the «…» key next to Ctrl is enabled.

Unfortunately, I could only bind Hyper combinations with an extra virtual modifier defined in xkb_types section above - this either requires an additional types file along with the symbols file or saving XKB settings in a single xkbcomp-like keymap source file as above.

This file can also be loaded in sway using xkb_file input command as follows:

input "1003:8258:MNT_Reform_Keyboard" xkb_file /path/to/reform.xkb
1 Like