Re: Mapping the N900 keyboard?

2009-11-19 Thread Qole
So no, that command, dsmetool -k /usr/bin/hildon-desktop is not an option,
since it kills the desktop. I can't kill the desktop. It has its uses ;-)

What is this XSetInputFocus and how do I set it from the command line?

2009/11/19 Qole qole.tab...@gmail.com



 2009/11/15 Kimmo Hämäläinen kimmo.hamalai...@nokia.com

 On Mon, 2009-11-16 at 08:39 +0100, ext Faheem Pervez wrote:
  On 11/16/09, Kimmo Hämäläinen kimmo.hamalai...@nokia.com wrote:
   On Mon, 2009-11-16 at 02:03 +0100, ext Qole wrote:
   I am still hoping for some more help with remapping the N900 keyboard
   (see quoted message below).
  
   I have come across a problem I believe is related, and it is much
 more
   urgent for me to identify and fix the problem.
  
   When I start a nested Xephyr X Server on the N900, the desktop
   environment that I run in that X Server (LXDE, on DISPLAY :1) does
 not
   seem to have access to the keyboard. No keyboard presses are passed
 to
   DISPLAY :1 at all. When I press the key combination to get to the
   Dashboard (CTRL-Backspace), I am taken to the Dashboard, which
   suggests that maybe Hildon desktop is not letting go of the
   keyboard.
  
   hildon-desktop does not ever grab the keyboard. It only grabs some
   specific key combinations, such as that ctrl+backspace.
  
   I have tried using xkbcomp as described below to copy the keyboard
   mapping to display :1, but it doesn't help.
  
   Does 'xev' report any key events?
  
 
  xev won't work on the N900 by default for exactly the same reason
  qole's LXDE stuff isn't working:
  https://bugs.maemo.org/show_bug.cgi?id=5987

 Seems to work after:
 1) dsmetool -k /usr/bin/hildon-desktop
 2) xev 
 3) tap on the xev window

 Or you could device a diabolical utility program that calls
 XSetInputFocus for the xev window...


 Could this dsmetool technique (which I don't pretend to understand at all)
 be used to help give my Xephyr window the required focus to receive keyboard
 input, too? Because the Xephyr window gets focus in every other way, that
 is, I can use an on-screen virtual keyboard within the secondary X Server to
 type, but not the physical N900 keyboard...

 I'm going to try it out, regardless.


 --
 enthusiast, n. One whose mind is wholly possessed and heated by what
 engages it; one who is influenced by a peculiar fervor of mind; an ardent
 and imaginative person.




-- 
enthusiast, n. One whose mind is wholly possessed and heated by what
engages it; one who is influenced by a peculiar fervor of mind; an ardent
and imaginative person.
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Mapping the N900 keyboard?

2009-11-19 Thread Kimmo Hämäläinen
On Fri, 2009-11-20 at 06:12 +0100, ext Qole wrote:
 So the problem is that the Maemo 5 WM is broken, according to this: 
 
 http://qt.gitorious.org/+qt-maemo-developers/qt/qt-
 maemo/commit/fbf22e64599b220cf95ca90d27d0eb6cdeaa91fe 
 
 Shouldn't there be a bug for this? 

I didn't know about that kind of comment :)  Typical that teams don't
ask the WM maintainer (me) about it.

Actually the N900 is not a desktop PC, as you might have noticed, so we
have a bit different focus logic.  We avoid setting focus to windows
unless they specifically request it, this is to avoid needless wake-ups
in processes (and thus power consumption and often window drawing).  It
works surprisingly well (except for xev maybe).

About dsmetool: it's just a tool that we use to tell the dsme daemon
that this process should be started as user X, nice level N, restarted K
times if it crashes, etc.

XSetInputFocus is the libx11 call that tells the X server to move
(keyboard) input focus to the window given as the argument.  The WM
calls that function to give focus to application windows, depending on
ICCCM guidelines and our own model (ICCCM allows the WM some freedoms).

-Kimmo

 - Original message - 
  On Mon, 2009-11-16 at 08:39 +0100, ext Faheem Pervez wrote: 
   On 11/16/09, Kimmo Hämäläinen kimmo.hamalai...@nokia.com wrote: 
On Mon, 2009-11-16 at 02:03 +0100, ext Qole wrote: 
 I am still hoping for some more help with remapping the N900
 keyboard 
 (see quoted message below). 
 
 I have come across a problem I believe is related, and it is
 much more 
 urgent for me to identify and fix the problem. 
 
 When I start a nested Xephyr X Server on the N900, the
 desktop 
 environment that I run in that X Server (LXDE, on DISPLAY :1)
 does not 
 seem to have access to the keyboard. No keyboard presses are
 passed to 
 DISPLAY :1 at all. When I press the key combination to get to
 the 
 Dashboard (CTRL-Backspace), I am taken to the Dashboard,
 which 
 suggests that maybe Hildon desktop is not letting go of the 
 keyboard. 

hildon-desktop does not ever grab the keyboard. It only grabs
 some 
specific key combinations, such as that ctrl+backspace. 

 I have tried using xkbcomp as described below to copy the
 keyboard 
 mapping to display :1, but it doesn't help. 

Does 'xev' report any key events? 

   
   xev won't work on the N900 by default for exactly the same reason 
   qole's LXDE stuff isn't working: 
   https://bugs.maemo.org/show_bug.cgi?id=5987 
  
  Seems to work after: 
  1) dsmetool -k /usr/bin/hildon-desktop 
  2) xev  
  3) tap on the xev window 
  
  Or you could device a diabolical utility program that calls 
  XSetInputFocus for the xev window... 
  
-Kimmo 

   
   Best Regards, 
   Faheem 
 
 Any help or suggestions? 
 
 On Tue, Nov 10, 2009 at 9:23 PM, Qole qole.tab...@gmail.com
 wrote: 
Now that the N900 has been released, I will
 post this question 
on maemo-developers, in the hopes that some
 Nokia devs can 
help me here. 
 
I would like to know how to remap the keyboard
 on the N900. 
I've received some help from Marius Gedminas,
 as you will see 
below, but I'd like to know how to map the
 keyboard 
permanently, without having to run xkbcomp
 every time. 
 
Here is the help that I've received so far: 
 
On Sun, Oct 25, 2009 at 4:23 AM, Marius
 Gedminas 
mar...@pov.lt wrote: 
 
 
 
I've had partial success by
 doing this: 
 
  $ xkbcomp :0 default.xkb 
  $ vi default.xkb 
 
comment out the two rules that
 cause syntax errors: 
 
//  interpret AccessX_Enable
 +AnyOfOrNone(all) { 
//  action=
 LockControls(controls=); 
//  }; 
 
//  interpret
 MouseKeys_Accel_Enable+AnyOfOrNone(all) 
{ 
//  action=
 LockControls(controls=); 
//  }; 
 
Now you can restore the
 settings back by running 
 
  $ xkbcmp default.xkb :0 
 
if you screw up and end up with
 a nonfunctional 
keyboard. 
 
Next 
 
  $ cp default.xkb mg.xkb 
  $ vi mg.xkb 
 
  key RGHT { 
  

Re: Mapping the N900 keyboard?

2009-11-15 Thread Qole
I am still hoping for some more help with remapping the N900 keyboard (see
quoted message below).

I have come across a problem I believe is related, and it is much more
urgent for me to identify and fix the problem.

When I start a nested Xephyr X Server on the N900, the desktop environment
that I run in that X Server (LXDE, on DISPLAY :1) does not seem to have
access to the keyboard. No keyboard presses are passed to DISPLAY :1 at all.
When I press the key combination to get to the Dashboard (CTRL-Backspace), I
am taken to the Dashboard, which suggests that maybe Hildon desktop is not
letting go of the keyboard.

I have tried using xkbcomp as described below to copy the keyboard mapping
to display :1, but it doesn't help.

Any help or suggestions?

On Tue, Nov 10, 2009 at 9:23 PM, Qole qole.tab...@gmail.com wrote:

 Now that the N900 has been released, I will post this question on
 maemo-developers, in the hopes that some Nokia devs can help me here.

 I would like to know how to remap the keyboard on the N900. I've received
 some help from Marius Gedminas, as you will see below, but I'd like to know
 how to map the keyboard permanently, without having to run xkbcomp every
 time.

 Here is the help that I've received so far:

 On Sun, Oct 25, 2009 at 4:23 AM, Marius Gedminas mar...@pov.lt wrote:


 I've had partial success by doing this:

  $ xkbcomp :0 default.xkb
  $ vi default.xkb

 comment out the two rules that cause syntax errors:

 //  interpret AccessX_Enable+AnyOfOrNone(all) {
 //  action= LockControls(controls=);
 //  };

 //  interpret MouseKeys_Accel_Enable+AnyOfOrNone(all) {
 //  action= LockControls(controls=);
 //  };

 Now you can restore the settings back by running

  $ xkbcmp default.xkb :0

 if you screw up and end up with a nonfunctional keyboard.

 Next

  $ cp default.xkb mg.xkb
  $ vi mg.xkb

key RGHT {
type= FOUR_LEVEL,
symbols[Group1]= [   Right,   Right,   Tab,   Tab ]
};

  $ xkbcomp mg.xkb :0

 and now Fn+Right arrow is a Tab key.

 Sadly I don't know enough about xkbcomp to see if it's possible to make
 it load incomplete maps on top of the current configuration, just to
 update a few symbols without replicating the full configuration.

  None of the changes I make to
 /usr/share/X11/xkb/symbols/nokia_vndr/rx-51
  have any effect (yes I reboot after changing the file).

 Maybe the files in /var/cache/xkb contain precompiled versions of those?

 I'm not adventurous enough to go and start editing files in /usr/.
 Although creating a new symbols file in there and loading it on top of
 the defaults with setxkbmap ought to maybe work...

 Marius Gedminas


 (I have already replied with the following:

 Replace
type= FOUR_LEVEL,
symbols[Group1]= [   Right,   Right,   Tab,   Tab ]
 with
type= PC_FN_LEVEL2,
symbols[Group1]= [   Right,   Tab ]

 and you will retain the ability to highlight text with shift-right arrow.)


 --
 enthusiast, n. One whose mind is wholly possessed and heated by what
 engages it; one who is influenced by a peculiar fervor of mind; an ardent
 and imaginative person.




-- 
enthusiast, n. One whose mind is wholly possessed and heated by what
engages it; one who is influenced by a peculiar fervor of mind; an ardent
and imaginative person.
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Mapping the N900 keyboard?

2009-11-15 Thread Kimmo Hämäläinen
On Mon, 2009-11-16 at 02:03 +0100, ext Qole wrote:
 I am still hoping for some more help with remapping the N900 keyboard
 (see quoted message below).
 
 I have come across a problem I believe is related, and it is much more
 urgent for me to identify and fix the problem.
 
 When I start a nested Xephyr X Server on the N900, the desktop
 environment that I run in that X Server (LXDE, on DISPLAY :1) does not
 seem to have access to the keyboard. No keyboard presses are passed to
 DISPLAY :1 at all. When I press the key combination to get to the
 Dashboard (CTRL-Backspace), I am taken to the Dashboard, which
 suggests that maybe Hildon desktop is not letting go of the
 keyboard.

hildon-desktop does not ever grab the keyboard. It only grabs some
specific key combinations, such as that ctrl+backspace.

 I have tried using xkbcomp as described below to copy the keyboard
 mapping to display :1, but it doesn't help.

Does 'xev' report any key events?

-Kimmo

 
 Any help or suggestions? 
 
 On Tue, Nov 10, 2009 at 9:23 PM, Qole qole.tab...@gmail.com wrote:
 Now that the N900 has been released, I will post this question
 on maemo-developers, in the hopes that some Nokia devs can
 help me here.
 
 I would like to know how to remap the keyboard on the N900.
 I've received some help from Marius Gedminas, as you will see
 below, but I'd like to know how to map the keyboard
 permanently, without having to run xkbcomp every time.
 
 Here is the help that I've received so far:
 
 On Sun, Oct 25, 2009 at 4:23 AM, Marius Gedminas
 mar...@pov.lt wrote:
 
 
 
 I've had partial success by doing this:
 
  $ xkbcomp :0 default.xkb
  $ vi default.xkb
 
 comment out the two rules that cause syntax errors:
 
 //  interpret AccessX_Enable+AnyOfOrNone(all) {
 //  action= LockControls(controls=);
 //  };
 
 //  interpret MouseKeys_Accel_Enable+AnyOfOrNone(all)
 {
 //  action= LockControls(controls=);
 //  };
 
 Now you can restore the settings back by running
 
  $ xkbcmp default.xkb :0
 
 if you screw up and end up with a nonfunctional
 keyboard.
 
 Next
 
  $ cp default.xkb mg.xkb
  $ vi mg.xkb
 
key RGHT {
type= FOUR_LEVEL,
symbols[Group1]= [   Right,   Right,
 Tab,   Tab ]
};
 
  $ xkbcomp mg.xkb :0
 
 and now Fn+Right arrow is a Tab key.
 
 Sadly I don't know enough about xkbcomp to see if it's
 possible to make
 it load incomplete maps on top of the current
 configuration, just to
 update a few symbols without replicating the full
 configuration.
 
  None of the changes I make
 to /usr/share/X11/xkb/symbols/nokia_vndr/rx-51
  have any effect (yes I reboot after changing the
 file).
 
 
 Maybe the files in /var/cache/xkb contain precompiled
 versions of those?
 
 I'm not adventurous enough to go and start editing
 files in /usr/.
 Although creating a new symbols file in there and
 loading it on top of
 the defaults with setxkbmap ought to maybe work...
 
 Marius Gedminas
 
 (I have already replied with the following:
 
 Replace 
type= FOUR_LEVEL,
symbols[Group1]= [   Right,   Right,   Tab,
 Tab ]
 
 with
type= PC_FN_LEVEL2,
symbols[Group1]= [   Right,   Tab ]
 
 
 and you will retain the ability to highlight text with shift-
 right arrow.)
 
 
 -- 
 enthusiast, n. One whose mind is wholly possessed and heated
 by what engages it; one who is influenced by a peculiar fervor
 of mind; an ardent and imaginative person.
 
 
 
 
 -- 
 enthusiast, n. One whose mind is wholly possessed and heated by what
 engages it; one who is influenced by a peculiar fervor of mind; an
 ardent and imaginative person.

___
maemo-developers 

Re: Mapping the N900 keyboard?

2009-11-15 Thread Faheem Pervez
On 11/16/09, Kimmo Hämäläinen kimmo.hamalai...@nokia.com wrote:
 On Mon, 2009-11-16 at 02:03 +0100, ext Qole wrote:
 I am still hoping for some more help with remapping the N900 keyboard
 (see quoted message below).

 I have come across a problem I believe is related, and it is much more
 urgent for me to identify and fix the problem.

 When I start a nested Xephyr X Server on the N900, the desktop
 environment that I run in that X Server (LXDE, on DISPLAY :1) does not
 seem to have access to the keyboard. No keyboard presses are passed to
 DISPLAY :1 at all. When I press the key combination to get to the
 Dashboard (CTRL-Backspace), I am taken to the Dashboard, which
 suggests that maybe Hildon desktop is not letting go of the
 keyboard.

 hildon-desktop does not ever grab the keyboard. It only grabs some
 specific key combinations, such as that ctrl+backspace.

 I have tried using xkbcomp as described below to copy the keyboard
 mapping to display :1, but it doesn't help.

 Does 'xev' report any key events?


xev won't work on the N900 by default for exactly the same reason
qole's LXDE stuff isn't working:
https://bugs.maemo.org/show_bug.cgi?id=5987
 -Kimmo


Best Regards,
Faheem

 Any help or suggestions?

 On Tue, Nov 10, 2009 at 9:23 PM, Qole qole.tab...@gmail.com wrote:
 Now that the N900 has been released, I will post this question
 on maemo-developers, in the hopes that some Nokia devs can
 help me here.

 I would like to know how to remap the keyboard on the N900.
 I've received some help from Marius Gedminas, as you will see
 below, but I'd like to know how to map the keyboard
 permanently, without having to run xkbcomp every time.

 Here is the help that I've received so far:

 On Sun, Oct 25, 2009 at 4:23 AM, Marius Gedminas
 mar...@pov.lt wrote:



 I've had partial success by doing this:

  $ xkbcomp :0 default.xkb
  $ vi default.xkb

 comment out the two rules that cause syntax errors:

 //  interpret AccessX_Enable+AnyOfOrNone(all) {
 //  action= LockControls(controls=);
 //  };

 //  interpret MouseKeys_Accel_Enable+AnyOfOrNone(all)
 {
 //  action= LockControls(controls=);
 //  };

 Now you can restore the settings back by running

  $ xkbcmp default.xkb :0

 if you screw up and end up with a nonfunctional
 keyboard.

 Next

  $ cp default.xkb mg.xkb
  $ vi mg.xkb

key RGHT {
type= FOUR_LEVEL,
symbols[Group1]= [   Right,   Right,
 Tab,   Tab ]
};

  $ xkbcomp mg.xkb :0

 and now Fn+Right arrow is a Tab key.

 Sadly I don't know enough about xkbcomp to see if it's
 possible to make
 it load incomplete maps on top of the current
 configuration, just to
 update a few symbols without replicating the full
 configuration.

  None of the changes I make
 to /usr/share/X11/xkb/symbols/nokia_vndr/rx-51
  have any effect (yes I reboot after changing the
 file).


 Maybe the files in /var/cache/xkb contain precompiled
 versions of those?

 I'm not adventurous enough to go and start editing
 files in /usr/.
 Although creating a new symbols file in there and
 loading it on top of
 the defaults with setxkbmap ought to maybe work...

 Marius Gedminas

 (I have already replied with the following:

 Replace
type= FOUR_LEVEL,
symbols[Group1]= [   Right,   Right,   Tab,
 Tab ]

 with
type= PC_FN_LEVEL2,
symbols[Group1]= [   Right,   Tab ]


 and you will retain the ability to highlight text with shift-
 right arrow.)


 --
 enthusiast, n. One whose mind is wholly possessed and heated
 by what engages it; one who is influenced by a peculiar fervor
 of mind; an ardent and imaginative person.




 --
 enthusiast, n. One whose mind is wholly possessed and heated by what
 engages it; one who is influenced by a peculiar fervor of mind; an
 ardent and imaginative person.

 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org

Re: Mapping the N900 keyboard?

2009-11-15 Thread juha.koivisto
 Sadly I don't know enough about xkbcomp to see if it's possible to make
 it load incomplete maps on top of the current configuration, just to
 update a few symbols without replicating the full configuration.

In principle yes - by using include in the xkb_keymap description.
See setxkbmap -print for a starting point.

Actually I have a keymap editor in the works (at home) which would
let you do this through a UI. Shouldn't take more
than a couple of
evenings to make an alpha release. Likely not going to be the next
couple of evenings in the calendar though.

--Juha

(N900 posting, broken thread and formatting, sorry)
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Mapping the N900 keyboard?

2009-11-10 Thread Qole
Now that the N900 has been released, I will post this question on
maemo-developers, in the hopes that some Nokia devs can help me here.

I would like to know how to remap the keyboard on the N900. I've received
some help from Marius Gedminas, as you will see below, but I'd like to know
how to map the keyboard permanently, without having to run xkbcomp every
time.

Here is the help that I've received so far:

On Sun, Oct 25, 2009 at 4:23 AM, Marius Gedminas mar...@pov.lt wrote:


 I've had partial success by doing this:

  $ xkbcomp :0 default.xkb
  $ vi default.xkb

 comment out the two rules that cause syntax errors:

 //  interpret AccessX_Enable+AnyOfOrNone(all) {
 //  action= LockControls(controls=);
 //  };

 //  interpret MouseKeys_Accel_Enable+AnyOfOrNone(all) {
 //  action= LockControls(controls=);
 //  };

 Now you can restore the settings back by running

  $ xkbcmp default.xkb :0

 if you screw up and end up with a nonfunctional keyboard.

 Next

  $ cp default.xkb mg.xkb
  $ vi mg.xkb

key RGHT {
type= FOUR_LEVEL,
symbols[Group1]= [   Right,   Right,   Tab,   Tab ]
};

  $ xkbcomp mg.xkb :0

 and now Fn+Right arrow is a Tab key.

 Sadly I don't know enough about xkbcomp to see if it's possible to make
 it load incomplete maps on top of the current configuration, just to
 update a few symbols without replicating the full configuration.

  None of the changes I make to /usr/share/X11/xkb/symbols/nokia_vndr/rx-51
  have any effect (yes I reboot after changing the file).

 Maybe the files in /var/cache/xkb contain precompiled versions of those?

 I'm not adventurous enough to go and start editing files in /usr/.
 Although creating a new symbols file in there and loading it on top of
 the defaults with setxkbmap ought to maybe work...

 Marius Gedminas


(I have already replied with the following:

Replace
   type= FOUR_LEVEL,
   symbols[Group1]= [   Right,   Right,   Tab,   Tab ]
with
   type= PC_FN_LEVEL2,
   symbols[Group1]= [   Right,   Tab ]

and you will retain the ability to highlight text with shift-right arrow.)

-- 
enthusiast, n. One whose mind is wholly possessed and heated by what
engages it; one who is influenced by a peculiar fervor of mind; an ardent
and imaginative person.
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers