Skip to content

Instantly share code, notes, and snippets.

import { Component, Input, ViewChildren } from '@angular/core';
import 'rxjs/add/operator/filter';
@Component({
selector: 'todo',
template: `
<div>{{title}}</div>
`
})
class Todo {
@revov
revov / README.md
Last active April 2, 2023 09:13
Remapping keys on Linux for a specific device (Wireless Laser Presenter)

Recently I bought a Chinese Wireless Laser Presenter. I planned on using it for RevealJS presentations and it worked perfectly (as PageUP/PageDown traverse well in the 2D slides). However, in order to have more control I wanted to map the other two buttons (FullScreen, BlankScreen) to Up and Down arrows, as well as remapping the PgUp/PgDn buttons to Left and Right. Since I will most probably be using Linux when giving presentations I though it would be easy to remap them. I quickly realised how wrong I was.

The presenter worked on Wayland but remapping the keys would be mission impossible. xinput --list didn't detect the presenter (the only way to get its EventID was to use the lower level sudo libinput-list-devices). The next steps that I am going to present also caused errors, so Wayland is out of the question as I didn't have patience to dig through it.

As I was skimming through various StackOverflow threads and blog posts I gained a bit of knowledge on how the Linux systems work with regards to inpu