Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 33164  / 3 Years ago, wed, may 19, 2021, 2:52:01

I have a Laptop with multiple outputs and use an external monitor pretty often. If I want to activate it, I have to go to system menu --> Displays and activate the external display. After using, I need to deactivate it with the same menu.



In Windows, I could do the same by simply pressing Win+P (Meta+P). Is there any hotkey or other way to achieve this behaviour in Unity (Ubuntu 11.04/11.10)? On a side-note, my laptop does have a button to switch output modes, but does not work (just opens the unity menu bar - I suspect it's a shortcut for Meta+P internally).



Addendum: The Laptop in question is a Dell Studio XPS 1640.



Addendum 2:
I've did some more research. xev gives me the following statement when pressing the "change CRT/LCD"-Button:



KeymapNotify event, serial 33, synthetic NO, window 0x0,
keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


In tty1, the command showkey gives me the following output:



key 125 pressed
key 25 pressed
key 25 released
key 125 released
key 28 pressed


Alternative output via showkey -s:



0xe0 0x5b 0x19 0x99 0xe0 0xdb
0x1c


The last line takes a second to show - I guess it refers to the enter-key. A quick look into dumpkeys|grep ^keycode reveals 125=ALT and 25=p. Looking in /lib/udev/keymaps/dell, the code for switching the video mode is set to 0x9B:



0x9B switchvideomode # Display Toggle button


Now, from what I see, the display-button is not mapped to a single key but to a key burst... any idea how to tackle the problem further is greatly appreciated.


More From » video

 Answers
7

Long time no see.



With Ubuntu 13.10, the normal Switch Display button of my Dell Studio XPS 1640 does work out of the box, although some weird behaviour happens with the Keys sent by this command (e.g. a lot of enter keys and being unable to use the main system menu in the right upper corner).



Another solution I found is to map a key (e.g. Win+P) to xrandr --auto in the keyboard shortcuts of the system settings.


[#43415] Thursday, May 20, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ippalogu

Total Points: 215
Total Questions: 127
Total Answers: 146

Location: Denmark
Member since Tue, Jul 19, 2022
2 Years ago
ippalogu questions
Tue, Jan 4, 22, 21:49, 2 Years ago
Tue, Sep 21, 21, 09:12, 3 Years ago
Wed, May 19, 21, 02:24, 3 Years ago
Mon, Dec 27, 21, 01:44, 2 Years ago
;