! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Allow XKB configuration through Keyboard Settings plugin.
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Xfce-mcs
Component:
Plugins

Comments

Description Stephan Arts editbugs 2006-06-05 21:03:53 CEST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.3) Gecko/20060326 Firefox/1.5.0.3 (Debian-1.5.dfsg+1.5.0.3-2)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.3) Gecko/20060326 Firefox/1.5.0.3 (Debian-1.5.dfsg+1.5.0.3-2)

Currently it is possible to configure the repeat rate of the keyboard, and the cursor blinking. What i would like to see is the ability to configure the XKB settings.

(Like the panel plugin in the goodies section does, change the layout and stuff)

In my opinion, this is a trivial task, something a keyboard settings dialog should provide. -- it can be done by calling 'setxkbmap', though i do not know if this is an application which all usual X servers provide.

Reproducible: Always
Comment 1 Olivier Fourdan editbugs 2006-06-05 21:40:23 CEST
Even more interesting would be the support for sticky keys that have no dedicated executable (as far as I know).

BTW calling an external program such as setxkbmap is not the right way to do it IMHO, would be more efficient and robust to use Xkb native fns instead.
Comment 2 Brian J. Tarricone (not reading bugmail) 2006-06-05 21:49:57 CEST
This would be kinda cool, but it's not just as simple as shelling out to a binary.  You have to build the lists of keymaps, then there are a bunch of options that maybe the X install supports, maybe not.  It would be a cool feature to have, though it's not by any means a "trivial task" as you say.

So... get coding ^_~.
Comment 3 Stephan Arts editbugs 2006-06-05 21:58:06 CEST
I will :)

One question though, what are sticky keys? :p
Comment 4 Stephan Arts editbugs 2006-06-05 22:06:09 CEST
(In reply to comment #3)
> I will :)
> 
> One question though, what are sticky keys? :p
> 

I googled around, and it looks like it allows modifier keys to be handled like toggle buttons. Is this correct?
Comment 5 Stephan Arts editbugs 2006-06-05 22:33:33 CEST
(In reply to comment #4)
> (In reply to comment #3)
> > I will :)
> > 
> > One question though, what are sticky keys? :p
> > 
> 
> I googled around, and it looks like it allows modifier keys to be handled like
> toggle buttons. Is this correct?
> 

ignore that... it is an X11 XKB extension option i see. I am working on it.

Will send the patch to the M/L or attach it to this bug when completed.
Comment 6 Stephan Arts editbugs 2006-06-06 10:58:44 CEST
Created attachment 595 
it does the basic sticky-key configuration.

Sticky keys can be configured, but there is nothing to detect if the sticky keys are disabled when the TwoKeyDisable option is set. (And it is not possible to enable the sticky keys again after that without going to the dialog)
Comment 7 Stephan Arts editbugs 2006-06-06 12:07:26 CEST
Comment on attachment 595 
it does the basic sticky-key configuration.

Patch does not support 5 * Shift to re-enable Sticky keys.
Comment 8 Stephan Arts editbugs 2006-06-06 12:10:42 CEST
Created attachment 596 
It supports all basic sticky key stuff now.

It supports the following:
 - Sticky Keys (duh...)
 - Two Key Disable
 - Five times Shift enable
 - Latch To Lock
Comment 9 Olivier Fourdan editbugs 2006-06-09 20:22:27 CEST
Wow, excellent!
Comment 10 Stephan Arts editbugs 2006-06-10 09:53:22 CEST
(In reply to comment #9)
> Wow, excellent!
> 

Any idea on how to notify the user when sticky keys are toggled during normal operation?

In Gnome the user gets a dialog anouncing the sticky keys are toggled, with the option to cancel it.

I think this is bad practice, because it is rather intrusive.
But there has to be some sort of notification.
Comment 11 Olivier Fourdan editbugs 2006-06-14 09:53:14 CEST
Ok, the patch is applied. As for notification, maybe a systray icon? Otherwise, I don't know.
Comment 12 Stephan Arts editbugs 2006-06-14 10:45:37 CEST
Created attachment 604 
Bounce- and Slow-keys support

I have implemented bounce and slowkeys aswell. (see patch)

I will add mousekeys-support too (mouse-pointer control through num-pad),
but i doubt wether it belongs in keyboard- or mouse plugin.
Comment 13 Olivier Fourdan editbugs 2006-06-14 11:57:18 CEST
Thanks, applied. For such simple patches, I think you can commit them directly with your own account, no need for me for that.

PS: It's "Accessibility", not "Accessability"
Comment 14 Stephan Arts editbugs 2006-06-15 23:25:59 CEST
Created attachment 608 
Mouse Keys supported and SlowKeysDelay/DeBounceDelay

I don't have commit access to trunk (yet?), so here is another patch.

I am working on the layout stuff now. Do you have any suggestions?

I am not really happy with the GUI layout of the accessibility tab, perhaps you have any suggestion for that?
Comment 15 Stephan Arts editbugs 2006-06-15 23:29:15 CEST
(In reply to comment #11)
> Ok, the patch is applied. As for notification, maybe a systray icon? Otherwise,
> I don't know.

Perhaps a feature for the XKB-panel-plugin from the goodies page?
Comment 16 Olivier Fourdan editbugs 2006-06-16 06:57:35 CEST
The patch doesn't apply, are you sure you updated your working copy?

As for the layout, I would suggest using "xfce_create_framebox_with_content ()" and placing options vertically instead of horizontally (it looks better and helps with i18n as some languages have longer sentences than others, and that doesn't work well with horizontal layouts).
Comment 17 Olivier Fourdan editbugs 2006-06-16 07:13:24 CEST
My bad (again... sorry), wrong file, committed.
Comment 18 Stephan Arts editbugs 2006-06-16 09:45:23 CEST
(In reply to comment #17)
> My bad (again... sorry), wrong file, committed.
> 

I will remember to create patches from the xfce-mcs-plugins base dir. ;)
Comment 19 Stephan Arts editbugs 2006-07-01 21:58:57 CEST
(In reply to comment #16)
> As for the layout, I would suggest using "xfce_create_framebox_with_content ()"
> and placing options vertically instead of horizontally (it looks better and
> helps with i18n as some languages have longer sentences than others, and that
> doesn't work well with horizontal layouts).

Current layout has really been packed tight. Using xfce_create_framebox_with_content() and packing options vertically means ending up with a really weird dialog size or dropping Slow / Bounce Keys.

Suggestions are welcome.
Comment 20 Stephan Arts editbugs 2006-08-31 22:35:34 CEST
Created attachment 763 
Moves mouse-keys to mouse-settings-dialog and packs keyboard-accessibility features vertically.
Comment 21 Olivier Fourdan editbugs 2006-09-01 05:55:05 CEST
Unfortunately, it doesn't work here, the mouse plugin crashes. Log follows:


(xfce-mcs-manager:18091): GLib-GObject-WARNING **: invalid cast from `GtkCheckButton' to `GtkNotebook'

(xfce-mcs-manager:18091): Gtk-CRITICAL **: gtk_notebook_append_page: assertion `GTK_IS_NOTEBOOK (notebook)' failed

(xfce-mcs-manager:18091): GLib-GObject-WARNING **: gsignal.c:1667: signal `toggled' is invalid for instance `0x8bfa70'

(xfce-mcs-manager:18091): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(xfce-mcs-manager:18091): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(xfce-mcs-manager:18091): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(xfce-mcs-manager:18091): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(xfce-mcs-manager:18091): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(xfce-mcs-manager:18091): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(xfce-mcs-manager:18091): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(xfce-mcs-manager:18091): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(xfce-mcs-manager:18091): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(xfce-mcs-manager:18091): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
Comment 22 Stephan Arts editbugs 2006-09-01 07:52:56 CEST
When compiled with --enable-debug=full, i have no problems with the mouse plugin. It works like a charm, but the kb-plugin crashes, i tested the same with the plugin currently in svn, and the problem remains :S.
Comment 23 Stephan Arts editbugs 2006-09-01 21:23:46 CEST
Created attachment 764 
Only fixes kb-settings dialog layout.

Only removes mouse-keys, and adjusts layout. should work, tested with --enable-debug=full and --disable-debug.
Comment 24 Stephan Arts editbugs 2006-09-02 12:40:57 CEST
Created attachment 765 
Adds mousekeys to mouse settings dialog
Comment 25 Stephan Arts editbugs 2006-09-02 16:00:34 CEST
(In reply to comment #24)
> Created an attachment (id=765) [edit]
> Adds mousekeys to mouse settings dialog
> 

And it does not do anything usefull... sorry.
Comment 26 Stephan Arts editbugs 2006-09-02 16:06:37 CEST
Created attachment 766 
A patch that works :)

I accidently removed a flag from the command that actually enables/disables the Mouse-keys. This patch is a replacement patch for 765, it adds mouse-keys to mouse-settings dialog AND fixes makes it work.
Comment 27 Olivier Fourdan editbugs 2006-09-02 22:05:46 CEST
Applied with some changes.
Comment 28 Stephan Arts editbugs 2006-09-03 09:17:00 CEST
Created attachment 767 
Fixes a compile issue with --enable-debug=full introduced with last patch. Adds systray icon to indicate mousekeys activity. Changes 'Mouse Keys' to 'Mouse Emulation' in dialog.

Icon should eventually idicate which mouse-button is emulated at that moment. (1, 2 or 3).
Comment 29 Olivier Fourdan editbugs 2006-09-04 19:37:20 CEST
Applied with changes (funky indent)
Comment 30 Stephan Arts editbugs 2006-09-04 21:15:11 CEST
(In reply to comment #29)
> Applied with changes (funky indent)
> 

hehe, right... i forgot to run sed -i 's/\t/  /g' :p
Comment 31 Stephan Arts editbugs 2006-09-11 21:55:28 CEST
Created attachment 789 
Fix 'default-button' display in systray, and add 'sane defaults' in config dialog

It adds a g_timeout to check for the mk_dflt_button every 100ms.

There are no apparent XEvents emitted when the default-button changes, so i can't check for that. (But i could be mistaking)

The Settings-dialog now has some sane defaults.
Comment 32 Benedikt Meurer editbugs 2006-09-11 22:18:01 CEST
Is a 100ms timeout really needed? That'll wakeup xfce-mcs-manager 10 times per second in that case.
Comment 33 Stephan Arts editbugs 2006-09-12 05:57:44 CEST
(In reply to comment #32)
> Is a 100ms timeout really needed? That'll wakeup xfce-mcs-manager 10 times per
> second in that case.
> 

I am not really sure either, but it only wakes up the xfce-mcs-manager when mousekeys are active.

A delay of 100ms gives the user the idea of 'real-time' updates, i dunno if this is nessecary, perhaps 200ms or even 300ms would be ok too. Though we probably get some bug-reports about it then.
Comment 34 Benedikt Meurer editbugs 2006-09-12 08:08:28 CEST
(In reply to comment #33)
> I am not really sure either, but it only wakes up the xfce-mcs-manager when
> mousekeys are active.

Not only xfce-mcs-manager, but also the Xserver.

> A delay of 100ms gives the user the idea of 'real-time' updates, i dunno if
> this is nessecary, perhaps 200ms or even 300ms would be ok too. Though we
> probably get some bug-reports about it then.

Hm, dunno.
Comment 35 Olivier Fourdan editbugs 2006-09-12 21:06:59 CEST
Humm, I have mixed feelings about that patch:

- Do you need to recreate the pixmaps every time in mousekeys_systray_timer_cb(), why not caching them? It's really small pixmaps...

- Don't you leak the pixbuf? It gets created but never unref'ed every 100 ms.

- I think 250ms might be enough, though I did not try neither values. It's just that 100ms is well, quite a high frequency for such a functionality.
Comment 36 Olivier Fourdan editbugs 2006-09-12 21:10:53 CEST
From GTK+ API documentation:

gtk_image_set_from_pixbuf ()

  See gtk_image_new_from_pixbuf() for details.

gtk_image_new_from_pixbuf ()

  Creates a new GtkImage displaying pixbuf. The GtkImage does not assume a reference to the pixbuf; you still need to unref it if you own references. GtkImage will add its own reference rather than adopting yours.

Comment 37 Stephan Arts editbugs 2006-09-13 11:56:18 CEST
(In reply to comment #36)
> From GTK+ API documentation:
> 
> gtk_image_set_from_pixbuf ()
> 
>   See gtk_image_new_from_pixbuf() for details.
> 
> gtk_image_new_from_pixbuf ()
> 
>   Creates a new GtkImage displaying pixbuf. The GtkImage does not assume a
> reference to the pixbuf; you still need to unref it if you own references.
> GtkImage will add its own reference rather than adopting yours.
> 

Good point that is a big mem-leak indeed...

Caching the pixbuf's is indeed a better approach.

I'd rather not have a loop at all, but have it work event-based.
Problem is X does not trigger an event when this attribute changes.
Comment 38 Stephan Arts editbugs 2006-09-22 06:26:44 CEST
Perhaps it is better to remove the systray icon for 4.4 and leave this feature for 4.6.
Comment 39 Fabian Rodriguez 2006-09-26 14:12:21 CEST
I'd looove to see this ASAP, for what it's worth. I am using XFCE in many low-resource PCs and this is a major problem for anyone not using the default / standrard US-en keyboard variant. Would it be possible to see any screenshots until I get to install the latest beta ?
Comment 40 Jani Monoses 2006-10-13 14:54:32 CEST
(In reply to comment #1)
> Even more interesting would be the support for sticky keys that have no
> dedicated executable (as far as I know).
> 

FYI there is xkbset, but it's good to have GUI too :)
Comment 41 Olivier Fourdan editbugs 2006-10-13 15:00:53 CEST
Jani, sticky keys are supported in current SVN (already in RC1 IIRC) throigh the keyboard settings -> Accessibility
Comment 42 Jani Monoses 2006-10-13 15:23:07 CEST
(In reply to comment #41)
> Jani, sticky keys are supported in current SVN (already in RC1 IIRC) throigh
> the keyboard settings -> Accessibility
> 

I know, I was just testing that GUI, and while reading about AccessX I found that there is a cmdline tool, so I mentioned it for whoever cares :)
Comment 43 Gauvain Pocentek 2007-01-14 17:07:03 CET
Created attachment 939 
patch against xfce-mcs-plugin svn revision 24447

Attaching a patch to add a layout configuration tab to the notebook.
It uses libxklavier. It works fine for me but has only been tested on linux x86.
It might be a good idea to keep this tool optional.
Comments are welcome!
Comment 44 Harold Aling 2007-09-23 20:30:01 CEST
> Comments are welcome!
> 

Anybody?
Comment 45 Zasenko Sergey 2008-09-25 22:00:17 CEST
Created attachment 1835 
Fixes (NULL) layouts

More details about the bug: http://bbs.archlinux.org/viewtopic.php?id=39529
Comment 46 Brian J. Tarricone (not reading bugmail) 2008-09-25 22:14:51 CEST
Hmm, unfortunately large portions of your patch will need to be redone against svn trunk of the xfce4-settings module.  xfce-mcs-plugins is dead; 4.4.x will be the last series to use it.
Comment 47 Zasenko Sergey 2008-09-25 22:22:26 CEST
Oh. This patch is for version xfce4-xkb-4.3 that is currently latest at gentoo' portage. Sorry.
Comment 48 Brian J. Tarricone (not reading bugmail) 2008-09-25 22:28:54 CEST
(In reply to comment #47)
> Oh. This patch is for version xfce4-xkb-4.3 that is currently latest at gentoo'
> portage. Sorry.

Oh -- is your patch for a non-Xfce application?  In that case I guess the app would need to be ported to the new framework.  Sorry, I'm just a little confused here, esp. since we natively support the slowkeys/bouncekeys/etc. stuff now.
Comment 49 Stephan Arts editbugs 2008-11-24 22:00:58 CET
Fixed

Bug #1901

Reported by:
Stephan Arts
Reported on: 2006-06-05
Last modified on: 2009-07-14

People

Assignee:
Xfce Bug Triage
CC List:
4 users

Version

Attachments

Additional information