odilia-app / odilia

A fast screenreader for the *nix desktop.
https://odilia.app
GNU General Public License v3.0
120 stars 17 forks source link

sohkd: do not use a hardcoded value for the odilia key #11

Closed TTWNO closed 1 year ago

TTWNO commented 2 years ago

At this time, the Odilia key only be capslock, due to a line in the code that explicitly ignores all capslock key presses.

// Don't emit command to virtual device if it's from a valid hotkey
// TODO: this will make sure that individual capslock keys send without any other modifiers or keys pressed will ALWAYS be consumed. This should be an option.
if !command_in_hotkeys && !(keyboard_state.state_keysyms.iter().count() == 0 && keyboard_state.state_modifiers.len() == 1 && keyboard_state.state_modifiers.iter().all(|&m| m == config::Modifier::CapsLock)) {
    uinput_device.emit(&[command]).unwrap();
}

Find a way to take in this key as a permenantly ignored key by itself. Maybe even see if it could be a keysym; this would be beneficial for those on desktop computers who want to use WP_Insert instead of capslock. Or maybe you have a specialized keyboard and you have a hyper key or whatever.

Anyway, just want to log this for future development. It would be good if Odilia can be the easiest screenreader to integrate with all environments :)

TTWNO commented 2 years ago

https://github.com/waycrate/swhkd/issues/165