This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Key for switch external monitor not work in Dell Latitude

Tags: dell, latitude, dual monitor dell, latitude, dual monitor dell, latitude, dual monitor
(comma "," separated)
Dibo
Registered Member
Posts
28
Karma
0
Hi,

I have Dell Latitude E7440. All function keys like brightness, volume, touchpad etc. are working fine except key for external monitor. It is connected via HDMI. I always must go to KDE settings, check external monitor and uncheck laptop display. If I try use function key then nothing is showing up. I have Kubuntu 14.04 64bit, updated. I think this is KDE issue because I had Xubuntu installed previously and on this distro with XFCE it worked fine (when using function key I had a list where I could select external monitor).
Second issue is when I unplug HDMI then KDE is not switching to laptop display automatically. I need remember this and switch manually in settings again before unplug.

Regards
luebking
Karma
0
The key will work, but XF86XK_Display is simply not bound to any action (I don't know whether anything in KDE provides a similar menu, but if you just want to toggle between LVDS and HDMI, you can eg. bind it to a bash script using xrandr to toggle them - or do whatever setup toggles you prefer)
Dibo
Registered Member
Posts
28
Karma
0
luebking wrote:bind it to a bash script using xrandr to toggle them - or do whatever setup toggles you prefer)

Thanks. Can you explain how do this? I even don't know where to begin. What is XF86XK_Display and how to assign it?
luebking
Karma
0
run "kcmshell[4|5] khotkeys" (the 4 or 5 suffix depends on your KDE version and distribution, sorry - it's a systemsettings module) and greate a new shortcut, bound to a command.

As for the script, this:
Code: Select all
#!/bin/bash
FIRST_NEW_ACTIVE=""
NEW_ACTIVE=""
NEW_INACTIVES=""
while read CONFIG; do
    OUTPUT="`cut -d" " -f1 <<< "${CONFIG}"`"
    if [ -z "${NEW_ACTIVE}" ] && ! grep -E ' [0-9]+x[0-9]+\+[0-9]+\+[0-9]+ ' > /dev/null <<< "${CONFIG}"; then
        if [ ! -z "${NEW_INACTIVES}" ]; then
            NEW_ACTIVE="${OUTPUT}"
        elif [ -z "${FIRST_NEW_ACTIVE}" ]; then
            FIRST_NEW_ACTIVE="${OUTPUT}"
        fi
    else
        NEW_INACTIVES="${NEW_INACTIVES} "${OUTPUT}""
    fi
done < <(xrandr -q | grep " connected")

if [ -z "${NEW_ACTIVE}" ]; then
    NEW_ACTIVE="$FIRST_NEW_ACTIVE"
fi

if [ ! -z "${NEW_ACTIVE}" ]; then
    CALL="xrandr --output "${NEW_ACTIVE}" --auto"
    for INACTIVE in ${NEW_INACTIVES}; do
        CALL="${CALL} --output "${INACTIVE}" --off"
    done
    eval ${CALL}
fi


should toggle across your connected screens.
Copy it somewhere (eg. ~/bin/toggle_screens.sh), make it executable (chmod +x) and bind it to the shortcut.

XF86XK_Display is the symbol the key hopefully generates, but you don't have to know this - you can simply click the shortcut button and then press the key (combination) you want to use.
Dibo
Registered Member
Posts
28
Karma
0
Working perfect! Thank you very much!


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]