After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 627098 - Support show up OSD for number lock, webcam, bluetooth, wlan hotkey
Support show up OSD for number lock, webcam, bluetooth, wlan hotkey
Status: RESOLVED WONTFIX
Product: gnome-settings-daemon
Classification: Core
Component: media-keys
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
: 607064 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-08-17 06:11 UTC by jlee
Modified: 2011-09-16 13:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-Support-show-up-OSD-when-number-lock-hotkey-pressed.patch (21.15 KB, patch)
2010-08-17 06:13 UTC, jlee
rejected Details | Review
0002-Support-show-up-OSD-when-webcam-disable-enable-hotke.patch (22.78 KB, patch)
2010-08-17 06:13 UTC, jlee
needs-work Details | Review
0003-Support-show-up-OSD-when-bluetooth-disable-enable-ho.patch (17.29 KB, patch)
2010-08-17 06:14 UTC, jlee
needs-work Details | Review
numlock-enabled.png (985.82 KB, image/png)
2010-08-17 15:17 UTC, jlee
  Details
numlock-disabled.png (989.25 KB, image/png)
2010-08-17 15:18 UTC, jlee
  Details
webcam-enabled.png (989.84 KB, image/png)
2010-08-17 15:18 UTC, jlee
  Details
webcam-disabled.png (989.71 KB, image/png)
2010-08-17 15:19 UTC, jlee
  Details
bluetooth-enabled.png (987.93 KB, image/png)
2010-08-17 15:19 UTC, jlee
  Details
bluetooth-disabled.png (987.69 KB, image/png)
2010-08-17 15:20 UTC, jlee
  Details
0004-Support-show-up-OSD-when-wlan-disable-enable-hotkey.patch (14.69 KB, patch)
2010-08-18 04:58 UTC, jlee
rejected Details | Review
wlan-disabled.png (987.68 KB, image/png)
2010-08-18 05:05 UTC, jlee
  Details
wlan-enabled.png (988.45 KB, image/png)
2010-08-18 05:06 UTC, jlee
  Details

Description jlee 2010-08-17 06:11:29 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.
Comment 1 jlee 2010-08-17 06:13:05 UTC
Created attachment 168022 [details] [review]
0001-Support-show-up-OSD-when-number-lock-hotkey-pressed.patch

Including source code and svg OSD icons
Comment 2 jlee 2010-08-17 06:13:31 UTC
Created attachment 168023 [details] [review]
0002-Support-show-up-OSD-when-webcam-disable-enable-hotke.patch

Including source code and svg OSD icons
Comment 3 jlee 2010-08-17 06:14:13 UTC
Created attachment 168024 [details] [review]
0003-Support-show-up-OSD-when-bluetooth-disable-enable-ho.patch

Including source code and svg OSD icons
Comment 4 jlee 2010-08-17 15:17:20 UTC
Created attachment 168094 [details]
numlock-enabled.png

Reference screenshot
Comment 5 jlee 2010-08-17 15:18:10 UTC
Created attachment 168095 [details]
numlock-disabled.png

Reference screenshot
Comment 6 jlee 2010-08-17 15:18:45 UTC
Created attachment 168096 [details]
webcam-enabled.png

Reference screenshot
Comment 7 jlee 2010-08-17 15:19:23 UTC
Created attachment 168097 [details]
webcam-disabled.png

Reference screenshot
Comment 8 jlee 2010-08-17 15:19:56 UTC
Created attachment 168098 [details]
bluetooth-enabled.png

Reference screenshot
Comment 9 jlee 2010-08-17 15:20:47 UTC
Created attachment 168099 [details]
bluetooth-disabled.png

Refreence screenshot
Comment 10 jlee 2010-08-18 04:58:32 UTC
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.
Comment 11 jlee 2010-08-18 05:05:26 UTC
Created attachment 168172 [details]
wlan-disabled.png

Reference screenshot
Comment 12 jlee 2010-08-18 05:06:07 UTC
Created attachment 168173 [details]
wlan-enabled.png

Reference screenshot
Comment 13 Bastien Nocera 2010-09-23 16:50:09 UTC
(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.
Comment 14 Bastien Nocera 2010-09-23 16:52:38 UTC
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.
Comment 15 Bastien Nocera 2010-09-23 16:55:57 UTC
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?
Comment 16 Bastien Nocera 2010-09-23 16:56:50 UTC
Review of attachment 168024 [details] [review]:

This should contact the bluetooth applet, not bluetoothd directly.
Comment 17 Bastien Nocera 2010-09-23 16:58:02 UTC
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.
Comment 18 jlee 2010-09-24 06:51:42 UTC
(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.
Comment 19 jlee 2010-09-24 06:53:35 UTC
(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.
Comment 20 jlee 2010-09-24 06:59:29 UTC
(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.
Comment 21 jlee 2010-09-24 07:02:18 UTC
(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.
Comment 22 jlee 2010-09-24 07:15:55 UTC
(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.
Comment 23 Bastien Nocera 2010-10-13 18:14:18 UTC
*** Bug 607064 has been marked as a duplicate of this bug. ***
Comment 24 Bastien Nocera 2010-10-13 18:15:12 UTC
See bug 607064 for how the webcam key should be handled (it needs kernel changes to propagate the webcam being made available).
Comment 25 Bastien Nocera 2011-09-16 13:26:49 UTC
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.