about summary refs log tree commit diff
path: root/modules/workstation/hardware/events.dyon
blob: 96cc15450e463fbc0eb22fab88a92ef8166d5fb8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! [events]
//! keys = ['ESC', 'TAB']
fn main() ~ evdevs, uinput {
    should_esc := false
    should_tab := false
    loop {
        evts := next_events(evdevs)
        for i {
            evt := evts[i]
            xcape(mut should_esc, evt, KEY_CAPSLOCK(), [KEY_ESC()])
            xcape(mut should_tab, evt, KEY_LEFTMETA(), [KEY_TAB()])
        }
    }
}