this post was submitted on 30 Oct 2024
3 points (100.0% liked)

Ask Lemmy

26638 readers
1838 users here now

A Fediverse community for open-ended, thought provoking questions


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either [email protected] or [email protected]. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email [email protected]. For other questions check our partnered communities list, or use the search function.


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 1 year ago
MODERATORS
 

I tend to use an external monitor with my laptop on a stand, taking the laptop with me to classes and such. Because of this, it'd be really cool to have the touchpad and keyboard on the laptop only control that one screen and do it separately from my normal inputs with an external mouse and keyboard. Obviously, this would require some configuration and would need to be opt-in, but I think it'd be useful for use with your "discord monitor", or one filling a similar role. What do y'all think about this idea and how would you like it to be/think it would have to be implemented?

top 1 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 14 hours ago

You can use xinput to restrict input devices to certain displays. I've got a touchscreen that, by default, think the touch area is the combined desktop span instead of just the external one. So I just lock the touch input devices to that.

Use xinput list and find the device IDs (id=XXX) for the mouse/keyboard you want to map to your secondary display.

Then use xrandr --query to list the monitor names (eDP-1, DP-1, HDMI-1, etc)

Finally, map the devices to that output as such: xinput map-to-output {ID} {DISPLAY}

e.g. if my keyboard input id is 9, and my mouse id is 10, and I want them to go to my external display witch is DP-1:

xinput map-to-output 9 DP-1 and xinput map-to-output 10 DP-1

The devices IDs are dynamic, and these are not persistent, so you'd probably want to script it to find them and automatically do the mapping.