Академический Документы
Профессиональный Документы
Культура Документы
Emulate the KBC Poker 3 keyboard layout on a standard keyboard by remapping the
Caps_Lock as the Poker 3 Fn key. This needs to be run as root and it's probably
a good idea to disable the regular function of the Caps_Lock key as well.
License: WTFPL
*/
package main
import (
"fmt"
"github.com/gvalkov/golang-evdev"
"github.com/ben-bensdevzone/uinput"
"os"
"syscall"
)
// Declare a global variable for whether or not caps lock is being held down.
var caps_on bool
// Open our argv as a device and a file so we can get the file
descriptor.
dev, err = evdev.Open(os.Args[1])
file, _ := os.Open(os.Args[1])
fd = uintptr(file.Fd())