Skip to content
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.

[request] add a SpaceFN function to your stdlib.dyon? #2

Open
hgersen opened this issue Feb 17, 2018 · 3 comments
Open

[request] add a SpaceFN function to your stdlib.dyon? #2

hgersen opened this issue Feb 17, 2018 · 3 comments

Comments

@hgersen
Copy link

hgersen commented Feb 17, 2018

SpaceFN is a concept that uses the spacebar as an additional mod key, see https://geekhack.org/index.php?topic=51069.0

Currently there doesn't appear to be a clean implementation under Linux. As a result implementing this could be a real demonstration of how useful evscript can be. Do you think that is possible?

btw) this doesn't work well when using xcape as xcape lacks rollover detection (see topic I link to above).

@valpackett
Copy link
Owner

hmm — evscript cannot remove emitted events, only create new ones (on a separate device) — so preventing the spacebar from repeating is not possible in a straightforward way.

I guess you'd have to remap the spacebar to some other key using… something (layouts in kernel?), and configure evscript to emit the space key when that key is pressed on its own.

Or use evscript as a proxy — forward all events from the original keyboard, modifying the spacebar — if you can prevent your compositor from picking up the original keyboard (something about udev labels?). I'm not a fan of this idea (a bit brittle and slightly increases latency), but I guess that shows the flexibility :)

@hgersen
Copy link
Author

hgersen commented Feb 21, 2018

I have not yet played with Wayland, but for X11 I do remap 'normal' keys using XCB, before xcape comes into play. The same thing would work for the spacebar, although don't know how to do that for wayland yet.

Are you saying that with a remapped spacebar one could implement SpaceFN relatively easily using your library?

btw) sorry for the question, but rust is not a language I'm that familiar with....and hence don't really see how to do this.

@valpackett
Copy link
Owner

I mean, if you remap at a lower level, before evscript comes into play.

(btw, not a library, an executable that runs scripts written in Dyon, not Rust)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants