GNOME Bugzilla – Bug 627098
Support show up OSD for number lock, webcam, bluetooth, wlan hotkey
Last modified: 2011-09-16 13:26:49 UTC
[PATCH 1/3] Support show up OSD when number lock hotkey pressed Many notebook/netbook have bluetooth disable/enable hotkey, this patch add a OSD show up feature when bluetooth disable/enable hotkey pressed. [PATCH 2/3] Support show up OSD when webcam disable/enable hotkey pressed Support show up OSD when webcam disable/enable hotkey pressed. Some notebook/netbook have webcam disab/enable hotkey, e.g. MSI [PATCH 3/3] Support show up OSD when bluetooth disable/enable hotkey pressed Many notebook/netbook have bluetooth disable/enable hotkey, this patch add a OSD show up feature when bluetooth disable/enable hotkey pressed.
Created attachment 168022 [details] [review] 0001-Support-show-up-OSD-when-number-lock-hotkey-pressed.patch Including source code and svg OSD icons
Created attachment 168023 [details] [review] 0002-Support-show-up-OSD-when-webcam-disable-enable-hotke.patch Including source code and svg OSD icons
Created attachment 168024 [details] [review] 0003-Support-show-up-OSD-when-bluetooth-disable-enable-ho.patch Including source code and svg OSD icons
Created attachment 168094 [details] numlock-enabled.png Reference screenshot
Created attachment 168095 [details] numlock-disabled.png Reference screenshot
Created attachment 168096 [details] webcam-enabled.png Reference screenshot
Created attachment 168097 [details] webcam-disabled.png Reference screenshot
Created attachment 168098 [details] bluetooth-enabled.png Reference screenshot
Created attachment 168099 [details] bluetooth-disabled.png Refreence screenshot
Created attachment 168170 [details] [review] 0004-Support-show-up-OSD-when-wlan-disable-enable-hotkey.patch Support show up OSD when wlan disable/enable hotkey pressed. This patch detect the wlan rfkill state by using udev for show up wlan state OSD.
Created attachment 168172 [details] wlan-disabled.png Reference screenshot
Created attachment 168173 [details] wlan-enabled.png Reference screenshot
(In reply to comment #0) > [PATCH 1 [details]/3] Support show up OSD when number lock hotkey pressed > Many notebook/netbook have bluetooth disable/enable hotkey, this patch > add a OSD show up feature when bluetooth disable/enable hotkey pressed. Copy-paste error here? Why would you want to show num-lock status as a popup? In any case, this should probably be a status icon instead. > [PATCH 2 [details]/3] Support show up OSD when webcam disable/enable hotkey pressed > Support show up OSD when webcam disable/enable hotkey pressed. > Some notebook/netbook have webcam disab/enable hotkey, e.g. MSI This is completely wrong. XF86Webcam is supposed to start up a webcam-related application. Did you actually test this on an MSI laptop? > [PATCH 3 [details]/3] Support show up OSD when bluetooth disable/enable hotkey pressed > Many notebook/netbook have bluetooth disable/enable hotkey, this patch > add a OSD show up feature when bluetooth disable/enable hotkey pressed. The bluetooth icon will/should already reflect that. There's no point in uploading separate files for the PNG files, they should be in the git formatted patches instead.
Review of attachment 168022 [details] [review]: This patch will just not work. ::: data/apps_gnome_settings_daemon_keybindings.schemas.in @@ +244,3 @@ + <locale name="C"> + <short>Number Lock</short> + <long>Binding to do something with Number Lock.</long> What's that supposed to be? You want to associate a different key to Num-lock? ::: plugins/media-keys/gsd-media-keys-manager.c @@ +1004,3 @@ break; + case NUM_LOCK_KEY: + do_num_lock_action (manager); That's completely wrong, we're supposed to be monitoring the num-lock key, not assigning a random key to show a popup.
Review of attachment 168023 [details] [review]: The webcam key either acts solely in the BIOS/kernel, in which case the webcam disappearing is the only way to see the event (which would trigger false positives when i disconnect my webcam from a desktop computer), or it needs user-space to do something (which this patch doesn't do), or it does both (in which case it's using the wrong keybinding). ::: data/apps_gnome_settings_daemon_keybindings.schemas.in @@ +252,3 @@ + <applyto>/apps/gnome_settings_daemon/keybindings/webcam</applyto> + <type>string</type> + <default>XF86WebCam</default> As mentioned, wrong keyboard binding altogether. ::: plugins/media-keys/gsd-media-keys-manager.c @@ +1072,3 @@ break; + case WEBCAM_KEY: + do_webcam_action (manager); This doesn't actually disable the webcam. What's the point?
Review of attachment 168024 [details] [review]: This should contact the bluetooth applet, not bluetoothd directly.
Review of attachment 168170 [details] [review]: This should already be reflected by NetworkManager's applet's state, possibly along with notifications if required. I don't think this should live in gnome-settings-daemon.
(In reply to comment #13) > (In reply to comment #0) > > [PATCH 1 [details] [details]/3] Support show up OSD when number lock hotkey pressed > > Many notebook/netbook have bluetooth disable/enable hotkey, this patch > > add a OSD show up feature when bluetooth disable/enable hotkey pressed. > > Copy-paste error here? Why would you want to show num-lock status as a popup? > In any case, this should probably be a status icon instead. > Yes, that's copy-paste error, sorry! And, I am working on Moblin/MeeGo netbook UI experience, Moblin/MeeGo also use gnome-settings-daemon, and it doesn't have system tray to show status icon. > > [PATCH 2 [details] [details]/3] Support show up OSD when webcam disable/enable hotkey pressed > > Support show up OSD when webcam disable/enable hotkey pressed. > > Some notebook/netbook have webcam disab/enable hotkey, e.g. MSI > > This is completely wrong. XF86Webcam is supposed to start up a webcam-related > application. Did you actually test this on an MSI laptop? > I tested it on MSI netbook, actually, it didn't start up any webcam-related application, like cheese. This webcam key turn on/off webcam's power. > > [PATCH 3 [details] [details]/3] Support show up OSD when bluetooth disable/enable hotkey pressed > > Many notebook/netbook have bluetooth disable/enable hotkey, this patch > > add a OSD show up feature when bluetooth disable/enable hotkey pressed. > > The bluetooth icon will/should already reflect that. > Like my statement, the Moblin/MeeGo didn't have system tray to show up bluetooth icon. > There's no point in uploading separate files for the PNG files, they should be > in the git formatted patches instead. Sorry, I didn't capture your mean, I contribute SVG files in the patch. Those PNG files just screenshots for anybody reference.
(In reply to comment #14) > Review of attachment 168022 [details] [review]: > > This patch will just not work. > > ::: data/apps_gnome_settings_daemon_keybindings.schemas.in > @@ +244,3 @@ > + <locale name="C"> > + <short>Number Lock</short> > + <long>Binding to do something with Number Lock.</long> > > What's that supposed to be? You want to associate a different key to Num-lock? > > ::: plugins/media-keys/gsd-media-keys-manager.c > @@ +1004,3 @@ > break; > + case NUM_LOCK_KEY: > + do_num_lock_action (manager); > > That's completely wrong, we're supposed to be monitoring the num-lock key, not > assigning a random key to show a popup. Thank's for your review. You are right, I will remove those keymap gconf for number lock key, only grab number lock key.
(In reply to comment #15) > Review of attachment 168023 [details] [review]: > > The webcam key either acts solely in the BIOS/kernel, in which case the webcam > disappearing is the only way to see the event (which would trigger false > positives when i disconnect my webcam from a desktop computer), or it needs > user-space to do something (which this patch doesn't do), or it does both (in > which case it's using the wrong keybinding). > Yes, the BIOS will set webcam power up/down, and at the same time, it also send out keycode to userland for OSD show up. My patch only show up the webcam status OSD. > ::: data/apps_gnome_settings_daemon_keybindings.schemas.in > @@ +252,3 @@ > + <applyto>/apps/gnome_settings_daemon/keybindings/webcam</applyto> > + <type>string</type> > + <default>XF86WebCam</default> > > As mentioned, wrong keyboard binding altogether. > So... which xkeyevent I can use to map the Fn+F6 hotkey (MSI netbook)? > ::: plugins/media-keys/gsd-media-keys-manager.c > @@ +1072,3 @@ > break; > + case WEBCAM_KEY: > + do_webcam_action (manager); > > This doesn't actually disable the webcam. What's the point? The patch do the follow job: - Query v4l video devices by udev. - Show up the status OSD.
(In reply to comment #16) > Review of attachment 168024 [details] [review]: > > This should contact the bluetooth applet, not bluetoothd directly. On Moblin/MeeGo, there have no system tray, so, have no bluetooth applet. So, this bluetooth OSD patch direct contact with bluetoothd like bluetooth applet. It's another bluetooth status report way to end user like bluetooth apple on system tray.
(In reply to comment #17) > Review of attachment 168170 [details] [review]: > > This should already be reflected by NetworkManager's applet's state, possibly > along with notifications if required. I don't think this should live in > gnome-settings-daemon. MeeGo/Moblin have no system tray for nm-applet. or Did you mean put the OSD in nm-applet is the right way for GNOME architecture? Gnome-settings-daemon already have a good OSD window object can be reused. If put those OSD job to different applets, that means need maintain duplicate OSD window code in a system. Like gnome-power-manager and gnome-settings-daemon, they are all have similar code for the same propose to show up OSD. We need maintain similar code in different component and need careful to sync the OSD style.
*** Bug 607064 has been marked as a duplicate of this bug. ***
See bug 607064 for how the webcam key should be handled (it needs kernel changes to propagate the webcam being made available).
No movement in a year about this. In GNOME 3, Bluetooth and WLAN status would be shown through the status icons. For the num-lock key, I can see this being needed in gnome-shell directly. See https://bugzilla.gnome.org/show_bug.cgi?id=659243 Finally, for the webcam, more work is required on the infrastructure, as mentioned in bug 607064.