All of lore.kernel.org
 help / color / mirror / Atom feed
* [matchbox-keyboard][PATCH 0/1] Addition of french keyboard
@ 2016-05-17  9:43 Herve Jourdain
  2016-05-17  9:43 ` [matchbox-keyboard][PATCH 1/1] " Herve Jourdain
  0 siblings, 1 reply; 7+ messages in thread
From: Herve Jourdain @ 2016-05-17  9:43 UTC (permalink / raw)
  To: yocto

The layout added is the one for French (France).
The behaviour for the CAPS keys is the same as Ubuntu (which is different from the behaviour in Windows).
In addition to the layout, a patch has been necessary to support a "caps" tag, that sets the value of the key when the CAPS action modifier is in effect.
There is no impact when the tag is not used in the xml description of the layout, therefore there should be no impact on previously existing keyboards.
This feature is needed for the french keyboard - at least - in order to handle the uppercase accented letters, that are the ones accessible when caps is on, for some keys.
Test has been done using sato.

Herve Jourdain (1):
  Addition of french keyboard

 .../files/0002-add-french-keyboard.patch           | 477 +++++++++++++++++++++
 .../matchbox-keyboard/matchbox-keyboard_git.bb     |   1 +
 2 files changed, 478 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch

-- 
2.7.4



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [matchbox-keyboard][PATCH 1/1] Addition of french keyboard
  2016-05-17  9:43 [matchbox-keyboard][PATCH 0/1] Addition of french keyboard Herve Jourdain
@ 2016-05-17  9:43 ` Herve Jourdain
  2016-05-17 12:13   ` Burton, Ross
  0 siblings, 1 reply; 7+ messages in thread
From: Herve Jourdain @ 2016-05-17  9:43 UTC (permalink / raw)
  To: yocto

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
---
 .../files/0002-add-french-keyboard.patch           | 477 +++++++++++++++++++++
 .../matchbox-keyboard/matchbox-keyboard_git.bb     |   1 +
 2 files changed, 478 insertions(+)
 create mode 100644 meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch

diff --git a/meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch b/meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch
new file mode 100644
index 0000000..c6dc5f7
--- /dev/null
+++ b/meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch
@@ -0,0 +1,477 @@
+diff --git a/layouts/Makefile.am b/layouts/Makefile.am
+index b439041..ed40256 100644
+--- a/layouts/Makefile.am
++++ b/layouts/Makefile.am
+@@ -1,4 +1,4 @@
+ keyboardsdir = $(datadir)/matchbox-keyboard
+ dist_keyboards_DATA = keyboard.xml keyboard-extended.xml keyboard-dvorak.xml \
+ 		      keyboard-us.xml keyboard-ru.xml keyboard-fi.xml        \
+-		      keyboard-numpad.xml
++		      keyboard-fr.xml keyboard-numpad.xml
+diff --git a/layouts/keyboard-fr.xml b/layouts/keyboard-fr.xml
+--- a/layouts/keyboard-fr.xml
++++ b/layouts/keyboard-fr.xml
+@@ -0,0 +1,343 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<keyboard>
++
++<!--
++
++ FR keyboard layout by Herve Jourdain <herve.jourdain@neuf.fr>
++
++-->
++
++<options>
++<!-- not yet implemented -->
++</options>
++
++<layout id="default keyboard">
++
++  <row>
++    <space width="500" extended="true"/>
++
++    <key fill="true">
++	  <default display="Esc" action="escape" />
++    </key>
++    <key>
++	  <default display="²" />
++	  <shifted display="³" />
++    </key>
++    <key>
++	  <default display="&amp;" />
++	  <shifted display="1" />
++    </key>
++    <key>
++	  <default display="é" />
++	  <shifted display='2' />
++	  <mod1 display='~' />
++	  <caps display="É" />
++    </key>
++    <key>
++	  <default display="&quot;" />
++	  <shifted display="3" />
++	  <mod1 display="#" />
++    </key>
++    <key>
++	  <default display="'" />
++	  <shifted display="4" />
++	  <mod1 display="{" />
++    </key>
++    <key>
++	  <default display="(" />
++	  <shifted display="5" />
++	  <mod1 display="[" />
++    </key>
++    <key>
++	  <default display="-" />
++	  <shifted display="6" />
++	  <mod1 display="|" />
++    </key>
++    <key>
++	  <default display="è" />
++	  <shifted display="7" />
++	  <mod1 display='`' />
++	  <caps display="È" />
++    </key>
++    <key>
++	  <default display="_" />
++	  <shifted display="8" />
++	  <mod1 display='\' />
++    </key>
++    <key>
++	  <default display="ç" />
++	  <shifted display="9" />
++	  <mod1 display='^' />
++	  <caps display="Ç" />
++    </key>
++    <key>
++	  <default display="à" />
++	  <shifted display="0" />
++	  <mod1 display='@' />
++	  <caps display="À" />
++    </key>
++    <key>
++	  <default display=")" />
++	  <shifted display="°" />
++	  <mod1 display="]" />
++    </key>
++    <key>
++	  <default display="=" />
++	  <shifted display="+" />
++	  <mod1 display="}" />
++    </key>
++    <key>
++	  <default display="*" />
++	  <shifted display="µ" />
++    </key>
++
++    <key fill="true">
++	  <default display="Suppr" action="backspace"/>
++    </key>
++
++    <space width="500" extended="true"/>
++
++    <key width="4000"  extended="true">
++	  <default display="Début" action="home"/>
++    </key>
++    <key width="4000"  extended="true">
++	  <default display="Préc" action="pageup"/>
++    </key>
++
++    <space width="500" extended="true"/>
++  </row>
++
++  <row>
++    <space width="500" extended="true"/>
++
++    <key fill="true">
++	  <default display="Tab" action="tab"/>
++    </key>
++    <key obey-caps='true'>
++	  <default display="a" />
++	  <shifted display="A" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="z" />
++	  <shifted display="Z" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="e" />
++	  <shifted display="E" />
++	  <mod1 display="€" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="r" />
++	  <shifted display="R" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="t" />
++	  <shifted display="T" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="y" />
++	  <shifted display="Y" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="u" />
++	  <shifted display="U" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="i" />
++	  <shifted display="I" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="o" />
++	  <shifted display="O" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="p" />
++	  <shifted display="P" />
++    </key>
++    <key>
++	  <default display="^" action="xkeysym:dead_circumflex"/>
++	  <shifted display="¨" action="xkeysym:dead_diaeresis"/>
++    </key>
++    <key>
++	  <default display="$" />
++	  <shifted display="£" />
++	  <mod1 display="ø" />
++    </key>
++    <key>
++	  <default display="Préc" action="pageup"/>
++    </key>
++    <key>
++	  <default display="Suiv" action="pagedown"/>
++    </key>
++
++    <space width="500" extended="true"/>
++
++    <key width="4000"  extended="true">
++	  <default display="Fin" action="end"/>
++    </key>
++    <key width="4000"  extended="true">
++	  <default display="Suiv" action="pagedown"/>
++    </key>
++
++    <space width="500" extended="true"/>
++  </row>
++
++  <row>
++    <space width="500" extended="true"/>
++
++    <key fill="true">
++	  <default display="Caps" action="modifier:caps"/>
++    </key>
++    <key obey-caps='true'>
++	  <default display="q" />
++	  <shifted display="Q" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="s" />
++	  <shifted display="S" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="d" />
++	  <shifted display="D" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="f" />
++	  <shifted display="F" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="g" />
++	  <shifted display="G" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="h" />
++	  <shifted display="H" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="j" />
++	  <shifted display="J" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="k" />
++	  <shifted display="K" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="l" />
++	  <shifted display="L" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="m" />
++	  <shifted display="M" />
++    </key>
++    <key>
++	  <default display="ù" />
++	  <shifted display="%" />
++	  <caps display="Ù" />
++    </key>
++    <key fill="true">
++	  <default display="Entrée" action="return"/>
++    </key>
++
++    <space width="500" extended="true"/>
++    <space width="4000"  extended="true" />
++    <space width="4000"  extended="true" />
++    <space width="500" extended="true"/>
++  </row>
++
++  <row>
++    <space width="500" extended="true"/>
++
++    <key fill="true">
++	  <default display="Maj" action="modifier:shift"/>
++    </key>
++    <key>
++	  <default display="&lt;" />
++	  <shifted display="&gt;" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="w" />
++	  <shifted display="W" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="x" />
++	  <shifted display="X" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="c" />
++	  <shifted display="C" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="v" />
++	  <shifted display="V" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="b" />
++	  <shifted display="B" />
++    </key>
++    <key obey-caps='true'>
++	  <default display="n" />
++	  <shifted display="N" />
++    </key>
++    <key>
++	  <default display="," />
++	  <shifted display="?" />
++    </key>
++    <key>
++	  <default display=";" />
++	  <shifted display="." />
++    </key>
++    <key>
++	  <default display=":" />
++	  <shifted display="/" />
++    </key>
++    <key>
++	  <default display="!" />
++	  <shifted display="§" />
++    </key>
++    <key fill="true">
++	  <default display="Maj" action="modifier:shift"/>
++    </key>
++
++    <space width="500" extended="true"/>
++    <space width="4000"  extended="true" />
++    <space width="4000"  extended="true" />
++    <space width="500" extended="true"/>
++  </row>
++
++  <row>
++    <space width="500" extended="true"/>
++
++    <key fill="true">
++	  <default display="Ctrl" action="modifier:ctrl"/>
++    </key>
++    <key>
++	  <default display="Alt" action="modifier:alt"/>
++    </key>
++    <key width="12000">
++	  <default display=" " action="space" />
++    </key>
++    <key>
++	  <default display="AGR" action="modifier:mod1"/>
++    </key>
++
++    <key>
++	  <default display="&#x2191;" action="up" />
++    </key>
++    <key>
++	  <default display="&#x2193;" action="down" />
++    </key>
++    <key>
++	  <default display="&#x2190;" action="left" />
++    </key>
++    <key>
++	  <default display="&#x2192;" action="right" />
++    </key>
++
++    <space width="500" extended="true"/>
++    <space width="4000"  extended="true" />
++    <space width="4000"  extended="true" />
++    <space width="500" extended="true"/>
++  </row>
++
++</layout>
++
++</keyboard>
+diff --git a/src/matchbox-keyboard.h b/src/matchbox-keyboard.h
+index 4dd258f..430b08b 100644
+--- a/src/matchbox-keyboard.h
++++ b/src/matchbox-keyboard.h
+@@ -116,6 +116,7 @@ typedef enum
+ {
+   MBKeyboardKeyStateNormal = 0,
+   MBKeyboardKeyStateShifted,
++  MBKeyboardKeyStateCaps,
+   MBKeyboardKeyStateMod1,
+   MBKeyboardKeyStateMod2,
+   MBKeyboardKeyStateMod3,
+diff --git a/src/matchbox-keyboard.c b/src/matchbox-keyboard.c
+index 9f9bb7d..3ed98c0 100644
+--- a/src/matchbox-keyboard.c
++++ b/src/matchbox-keyboard.c
+@@ -200,6 +200,9 @@ mb_kbd_keys_current_state(MBKeyboard *kbd)
+   if (mb_kbd_has_state(kbd, MBKeyboardStateShifted))
+     return MBKeyboardKeyStateShifted;
+ 
++  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps))
++    return MBKeyboardKeyStateCaps;
++
+   if (mb_kbd_has_state(kbd, MBKeyboardStateMod1))
+     return MBKeyboardKeyStateMod1;
+ 
+diff --git a/src/matchbox-keyboard-key.c b/src/matchbox-keyboard-key.c
+index 0555c9c..c086fbe 100644
+--- a/src/matchbox-keyboard-key.c
++++ b/src/matchbox-keyboard-key.c
+@@ -413,9 +413,13 @@ mb_kbd_key_press(MBKeyboardKey *key)
+ 
+   state = mb_kbd_keys_current_state(key->kbd);
+ 
+-  if (mb_kbd_has_state(key->kbd, MBKeyboardStateCaps)
+-      && mb_kbd_key_get_obey_caps(key))
+-    state = MBKeyboardKeyStateShifted;
++  if (mb_kbd_has_state(key->kbd, MBKeyboardStateCaps))
++  {
++    if (mb_kdb_key_has_state (key, MBKeyboardKeyStateCaps))
++      state = MBKeyboardKeyStateCaps;
++    else if (mb_kbd_key_get_obey_caps(key))
++      state = MBKeyboardKeyStateShifted;
++  }
+ 
+   /* XXX below fakekey mods probably better in ui */
+ 
+@@ -616,6 +620,7 @@ mb_kbd_key_dump_key(MBKeyboardKey *key)
+     {
+       /* MBKeyboardKeyStateNormal  */ "Normal",
+       /* MBKeyboardKeyStateShifted */ "Shifted" ,
++      /* MBKeyboardKeyStateCaps    */ "Caps" ,
+       /* MBKeyboardKeyStateMod1,    */ "Mod1" ,
+       /* MBKeyboardKeyStateMod2,    */ "Mod2" ,
+       /* MBKeyboardKeyStateMod3,    */ "Mod3" 
+diff --git a/src/config-parser.c b/src/config-parser.c
+index 15a973e..13ee6d6 100644
+--- a/src/config-parser.c
++++ b/src/config-parser.c
+@@ -326,6 +326,10 @@ config_handle_key_subtag(MBKeyboardConfigState *state,
+     {
+       keystate = MBKeyboardKeyStateShifted;
+     }
++  else if (streq(tag, "caps"))
++    {
++      keystate = MBKeyboardKeyStateCaps;
++    }
+   else if (streq(tag, "mod1"))
+     {
+       keystate = MBKeyboardKeyStateMod1;
+@@ -548,6 +552,7 @@ config_xml_start_cb(void *data, const char *tag, const char **attr)
+   else if (streq(tag, "normal") 
+ 	   || streq(tag, "default")
+ 	   || streq(tag, "shifted")
++	   || streq(tag, "caps")
+ 	   || streq(tag, "mod1")
+ 	   || streq(tag, "mod2")
+ 	   || streq(tag, "mod3"))
+diff --git a/src/matchbox-keyboard-ui-cairo-backend.c b/src/matchbox-keyboard-ui-cairo-backend.c
+index 3b7a401..3f15ac8 100644
+--- a/src/matchbox-keyboard-ui-cairo-backend.c
++++ b/src/matchbox-keyboard-ui-cairo-backend.c
+@@ -174,9 +174,13 @@ mb_kbd_ui_cairo_redraw_key(MBKeyboardUI  *ui, MBKeyboardKey *key)
+ 
+   state = mb_kbd_keys_current_state(kbd); 
+ 
+-  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps)
+-      && mb_kbd_key_get_obey_caps(key))
+-    state = MBKeyboardKeyStateShifted;
++  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps))
++    {
++      if (mb_kdb_key_has_state (key, MBKeyboardKeyStateCaps))
++        state = MBKeyboardKeyStateCaps;
++      else if (mb_kbd_key_get_obey_caps(key))
++        state = MBKeyboardKeyStateShifted;
++    }
+ 
+   if (!mb_kdb_key_has_state(key, state))
+     {
+diff --git a/src/matchbox-keyboard-ui-xft-backend.c b/src/matchbox-keyboard-ui-xft-backend.c
+index 9a3c6d2..2790591 100644
+--- a/src/matchbox-keyboard-ui-xft-backend.c
++++ b/src/matchbox-keyboard-ui-xft-backend.c
+@@ -212,9 +212,13 @@ mb_kbd_ui_xft_redraw_key(MBKeyboardUI  *ui, MBKeyboardKey *key)
+ 
+   state = mb_kbd_keys_current_state(kbd); 
+ 
+-  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps)
+-      && mb_kbd_key_get_obey_caps(key))
+-    state = MBKeyboardKeyStateShifted;
++  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps))
++    {
++      if (mb_kdb_key_has_state (key, MBKeyboardKeyStateCaps))
++        state = MBKeyboardKeyStateCaps;
++      else if (mb_kbd_key_get_obey_caps(key))
++        state = MBKeyboardKeyStateShifted;
++    }
+ 
+   if (!mb_kdb_key_has_state(key, state))
+     {
diff --git a/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb b/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb
index eba1970..6d9d943 100644
--- a/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb
+++ b/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb
@@ -16,6 +16,7 @@ PR = "r4"
 
 SRC_URI = "git://git.yoctoproject.org/${BPN};branch=matchbox-keyboard-0-1 \
            file://0001-desktop-file-Hide-the-keyboard-from-app-list.patch \
+           file://0002-add-french-keyboard.patch \
            file://80matchboxkeyboard.sh"
 
 S = "${WORKDIR}/git"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [matchbox-keyboard][PATCH 1/1] Addition of french keyboard
  2016-05-17  9:43 ` [matchbox-keyboard][PATCH 1/1] " Herve Jourdain
@ 2016-05-17 12:13   ` Burton, Ross
  2016-05-17 13:58     ` Herve Jourdain
  2016-05-18  6:03     ` Herve Jourdain
  0 siblings, 2 replies; 7+ messages in thread
From: Burton, Ross @ 2016-05-17 12:13 UTC (permalink / raw)
  To: Herve Jourdain; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 17124 bytes --]

Hi Herve,

Can you submit the two patches (caps behaviour, and french layout) against
the matchbox-keyboard-0.1 branch directly to this list please?  Then we can
just bump the srcrev in the recipe instead of carrying patches against our
own software.

Ross

On 17 May 2016 at 10:43, Herve Jourdain <herve.jourdain@neuf.fr> wrote:

> Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
> ---
>  .../files/0002-add-french-keyboard.patch           | 477
> +++++++++++++++++++++
>  .../matchbox-keyboard/matchbox-keyboard_git.bb     |   1 +
>  2 files changed, 478 insertions(+)
>  create mode 100644
> meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch
>
> diff --git
> a/meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch
> b/meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch
> new file mode 100644
> index 0000000..c6dc5f7
> --- /dev/null
> +++
> b/meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch
> @@ -0,0 +1,477 @@
> +diff --git a/layouts/Makefile.am b/layouts/Makefile.am
> +index b439041..ed40256 100644
> +--- a/layouts/Makefile.am
> ++++ b/layouts/Makefile.am
> +@@ -1,4 +1,4 @@
> + keyboardsdir = $(datadir)/matchbox-keyboard
> + dist_keyboards_DATA = keyboard.xml keyboard-extended.xml
> keyboard-dvorak.xml \
> +                     keyboard-us.xml keyboard-ru.xml keyboard-fi.xml
>   \
> +-                    keyboard-numpad.xml
> ++                    keyboard-fr.xml keyboard-numpad.xml
> +diff --git a/layouts/keyboard-fr.xml b/layouts/keyboard-fr.xml
> +--- a/layouts/keyboard-fr.xml
> ++++ b/layouts/keyboard-fr.xml
> +@@ -0,0 +1,343 @@
> ++<?xml version="1.0" encoding="UTF-8"?>
> ++<keyboard>
> ++
> ++<!--
> ++
> ++ FR keyboard layout by Herve Jourdain <herve.jourdain@neuf.fr>
> ++
> ++-->
> ++
> ++<options>
> ++<!-- not yet implemented -->
> ++</options>
> ++
> ++<layout id="default keyboard">
> ++
> ++  <row>
> ++    <space width="500" extended="true"/>
> ++
> ++    <key fill="true">
> ++        <default display="Esc" action="escape" />
> ++    </key>
> ++    <key>
> ++        <default display="²" />
> ++        <shifted display="³" />
> ++    </key>
> ++    <key>
> ++        <default display="&amp;" />
> ++        <shifted display="1" />
> ++    </key>
> ++    <key>
> ++        <default display="é" />
> ++        <shifted display='2' />
> ++        <mod1 display='~' />
> ++        <caps display="É" />
> ++    </key>
> ++    <key>
> ++        <default display="&quot;" />
> ++        <shifted display="3" />
> ++        <mod1 display="#" />
> ++    </key>
> ++    <key>
> ++        <default display="'" />
> ++        <shifted display="4" />
> ++        <mod1 display="{" />
> ++    </key>
> ++    <key>
> ++        <default display="(" />
> ++        <shifted display="5" />
> ++        <mod1 display="[" />
> ++    </key>
> ++    <key>
> ++        <default display="-" />
> ++        <shifted display="6" />
> ++        <mod1 display="|" />
> ++    </key>
> ++    <key>
> ++        <default display="è" />
> ++        <shifted display="7" />
> ++        <mod1 display='`' />
> ++        <caps display="È" />
> ++    </key>
> ++    <key>
> ++        <default display="_" />
> ++        <shifted display="8" />
> ++        <mod1 display='\' />
> ++    </key>
> ++    <key>
> ++        <default display="ç" />
> ++        <shifted display="9" />
> ++        <mod1 display='^' />
> ++        <caps display="Ç" />
> ++    </key>
> ++    <key>
> ++        <default display="à" />
> ++        <shifted display="0" />
> ++        <mod1 display='@' />
> ++        <caps display="À" />
> ++    </key>
> ++    <key>
> ++        <default display=")" />
> ++        <shifted display="°" />
> ++        <mod1 display="]" />
> ++    </key>
> ++    <key>
> ++        <default display="=" />
> ++        <shifted display="+" />
> ++        <mod1 display="}" />
> ++    </key>
> ++    <key>
> ++        <default display="*" />
> ++        <shifted display="µ" />
> ++    </key>
> ++
> ++    <key fill="true">
> ++        <default display="Suppr" action="backspace"/>
> ++    </key>
> ++
> ++    <space width="500" extended="true"/>
> ++
> ++    <key width="4000"  extended="true">
> ++        <default display="Début" action="home"/>
> ++    </key>
> ++    <key width="4000"  extended="true">
> ++        <default display="Préc" action="pageup"/>
> ++    </key>
> ++
> ++    <space width="500" extended="true"/>
> ++  </row>
> ++
> ++  <row>
> ++    <space width="500" extended="true"/>
> ++
> ++    <key fill="true">
> ++        <default display="Tab" action="tab"/>
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="a" />
> ++        <shifted display="A" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="z" />
> ++        <shifted display="Z" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="e" />
> ++        <shifted display="E" />
> ++        <mod1 display="€" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="r" />
> ++        <shifted display="R" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="t" />
> ++        <shifted display="T" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="y" />
> ++        <shifted display="Y" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="u" />
> ++        <shifted display="U" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="i" />
> ++        <shifted display="I" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="o" />
> ++        <shifted display="O" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="p" />
> ++        <shifted display="P" />
> ++    </key>
> ++    <key>
> ++        <default display="^" action="xkeysym:dead_circumflex"/>
> ++        <shifted display="¨" action="xkeysym:dead_diaeresis"/>
> ++    </key>
> ++    <key>
> ++        <default display="$" />
> ++        <shifted display="£" />
> ++        <mod1 display="ø" />
> ++    </key>
> ++    <key>
> ++        <default display="Préc" action="pageup"/>
> ++    </key>
> ++    <key>
> ++        <default display="Suiv" action="pagedown"/>
> ++    </key>
> ++
> ++    <space width="500" extended="true"/>
> ++
> ++    <key width="4000"  extended="true">
> ++        <default display="Fin" action="end"/>
> ++    </key>
> ++    <key width="4000"  extended="true">
> ++        <default display="Suiv" action="pagedown"/>
> ++    </key>
> ++
> ++    <space width="500" extended="true"/>
> ++  </row>
> ++
> ++  <row>
> ++    <space width="500" extended="true"/>
> ++
> ++    <key fill="true">
> ++        <default display="Caps" action="modifier:caps"/>
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="q" />
> ++        <shifted display="Q" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="s" />
> ++        <shifted display="S" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="d" />
> ++        <shifted display="D" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="f" />
> ++        <shifted display="F" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="g" />
> ++        <shifted display="G" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="h" />
> ++        <shifted display="H" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="j" />
> ++        <shifted display="J" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="k" />
> ++        <shifted display="K" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="l" />
> ++        <shifted display="L" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="m" />
> ++        <shifted display="M" />
> ++    </key>
> ++    <key>
> ++        <default display="ù" />
> ++        <shifted display="%" />
> ++        <caps display="Ù" />
> ++    </key>
> ++    <key fill="true">
> ++        <default display="Entrée" action="return"/>
> ++    </key>
> ++
> ++    <space width="500" extended="true"/>
> ++    <space width="4000"  extended="true" />
> ++    <space width="4000"  extended="true" />
> ++    <space width="500" extended="true"/>
> ++  </row>
> ++
> ++  <row>
> ++    <space width="500" extended="true"/>
> ++
> ++    <key fill="true">
> ++        <default display="Maj" action="modifier:shift"/>
> ++    </key>
> ++    <key>
> ++        <default display="&lt;" />
> ++        <shifted display="&gt;" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="w" />
> ++        <shifted display="W" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="x" />
> ++        <shifted display="X" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="c" />
> ++        <shifted display="C" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="v" />
> ++        <shifted display="V" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="b" />
> ++        <shifted display="B" />
> ++    </key>
> ++    <key obey-caps='true'>
> ++        <default display="n" />
> ++        <shifted display="N" />
> ++    </key>
> ++    <key>
> ++        <default display="," />
> ++        <shifted display="?" />
> ++    </key>
> ++    <key>
> ++        <default display=";" />
> ++        <shifted display="." />
> ++    </key>
> ++    <key>
> ++        <default display=":" />
> ++        <shifted display="/" />
> ++    </key>
> ++    <key>
> ++        <default display="!" />
> ++        <shifted display="§" />
> ++    </key>
> ++    <key fill="true">
> ++        <default display="Maj" action="modifier:shift"/>
> ++    </key>
> ++
> ++    <space width="500" extended="true"/>
> ++    <space width="4000"  extended="true" />
> ++    <space width="4000"  extended="true" />
> ++    <space width="500" extended="true"/>
> ++  </row>
> ++
> ++  <row>
> ++    <space width="500" extended="true"/>
> ++
> ++    <key fill="true">
> ++        <default display="Ctrl" action="modifier:ctrl"/>
> ++    </key>
> ++    <key>
> ++        <default display="Alt" action="modifier:alt"/>
> ++    </key>
> ++    <key width="12000">
> ++        <default display=" " action="space" />
> ++    </key>
> ++    <key>
> ++        <default display="AGR" action="modifier:mod1"/>
> ++    </key>
> ++
> ++    <key>
> ++        <default display="&#x2191;" action="up" />
> ++    </key>
> ++    <key>
> ++        <default display="&#x2193;" action="down" />
> ++    </key>
> ++    <key>
> ++        <default display="&#x2190;" action="left" />
> ++    </key>
> ++    <key>
> ++        <default display="&#x2192;" action="right" />
> ++    </key>
> ++
> ++    <space width="500" extended="true"/>
> ++    <space width="4000"  extended="true" />
> ++    <space width="4000"  extended="true" />
> ++    <space width="500" extended="true"/>
> ++  </row>
> ++
> ++</layout>
> ++
> ++</keyboard>
> +diff --git a/src/matchbox-keyboard.h b/src/matchbox-keyboard.h
> +index 4dd258f..430b08b 100644
> +--- a/src/matchbox-keyboard.h
> ++++ b/src/matchbox-keyboard.h
> +@@ -116,6 +116,7 @@ typedef enum
> + {
> +   MBKeyboardKeyStateNormal = 0,
> +   MBKeyboardKeyStateShifted,
> ++  MBKeyboardKeyStateCaps,
> +   MBKeyboardKeyStateMod1,
> +   MBKeyboardKeyStateMod2,
> +   MBKeyboardKeyStateMod3,
> +diff --git a/src/matchbox-keyboard.c b/src/matchbox-keyboard.c
> +index 9f9bb7d..3ed98c0 100644
> +--- a/src/matchbox-keyboard.c
> ++++ b/src/matchbox-keyboard.c
> +@@ -200,6 +200,9 @@ mb_kbd_keys_current_state(MBKeyboard *kbd)
> +   if (mb_kbd_has_state(kbd, MBKeyboardStateShifted))
> +     return MBKeyboardKeyStateShifted;
> +
> ++  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps))
> ++    return MBKeyboardKeyStateCaps;
> ++
> +   if (mb_kbd_has_state(kbd, MBKeyboardStateMod1))
> +     return MBKeyboardKeyStateMod1;
> +
> +diff --git a/src/matchbox-keyboard-key.c b/src/matchbox-keyboard-key.c
> +index 0555c9c..c086fbe 100644
> +--- a/src/matchbox-keyboard-key.c
> ++++ b/src/matchbox-keyboard-key.c
> +@@ -413,9 +413,13 @@ mb_kbd_key_press(MBKeyboardKey *key)
> +
> +   state = mb_kbd_keys_current_state(key->kbd);
> +
> +-  if (mb_kbd_has_state(key->kbd, MBKeyboardStateCaps)
> +-      && mb_kbd_key_get_obey_caps(key))
> +-    state = MBKeyboardKeyStateShifted;
> ++  if (mb_kbd_has_state(key->kbd, MBKeyboardStateCaps))
> ++  {
> ++    if (mb_kdb_key_has_state (key, MBKeyboardKeyStateCaps))
> ++      state = MBKeyboardKeyStateCaps;
> ++    else if (mb_kbd_key_get_obey_caps(key))
> ++      state = MBKeyboardKeyStateShifted;
> ++  }
> +
> +   /* XXX below fakekey mods probably better in ui */
> +
> +@@ -616,6 +620,7 @@ mb_kbd_key_dump_key(MBKeyboardKey *key)
> +     {
> +       /* MBKeyboardKeyStateNormal  */ "Normal",
> +       /* MBKeyboardKeyStateShifted */ "Shifted" ,
> ++      /* MBKeyboardKeyStateCaps    */ "Caps" ,
> +       /* MBKeyboardKeyStateMod1,    */ "Mod1" ,
> +       /* MBKeyboardKeyStateMod2,    */ "Mod2" ,
> +       /* MBKeyboardKeyStateMod3,    */ "Mod3"
> +diff --git a/src/config-parser.c b/src/config-parser.c
> +index 15a973e..13ee6d6 100644
> +--- a/src/config-parser.c
> ++++ b/src/config-parser.c
> +@@ -326,6 +326,10 @@ config_handle_key_subtag(MBKeyboardConfigState
> *state,
> +     {
> +       keystate = MBKeyboardKeyStateShifted;
> +     }
> ++  else if (streq(tag, "caps"))
> ++    {
> ++      keystate = MBKeyboardKeyStateCaps;
> ++    }
> +   else if (streq(tag, "mod1"))
> +     {
> +       keystate = MBKeyboardKeyStateMod1;
> +@@ -548,6 +552,7 @@ config_xml_start_cb(void *data, const char *tag,
> const char **attr)
> +   else if (streq(tag, "normal")
> +          || streq(tag, "default")
> +          || streq(tag, "shifted")
> ++         || streq(tag, "caps")
> +          || streq(tag, "mod1")
> +          || streq(tag, "mod2")
> +          || streq(tag, "mod3"))
> +diff --git a/src/matchbox-keyboard-ui-cairo-backend.c
> b/src/matchbox-keyboard-ui-cairo-backend.c
> +index 3b7a401..3f15ac8 100644
> +--- a/src/matchbox-keyboard-ui-cairo-backend.c
> ++++ b/src/matchbox-keyboard-ui-cairo-backend.c
> +@@ -174,9 +174,13 @@ mb_kbd_ui_cairo_redraw_key(MBKeyboardUI  *ui,
> MBKeyboardKey *key)
> +
> +   state = mb_kbd_keys_current_state(kbd);
> +
> +-  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps)
> +-      && mb_kbd_key_get_obey_caps(key))
> +-    state = MBKeyboardKeyStateShifted;
> ++  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps))
> ++    {
> ++      if (mb_kdb_key_has_state (key, MBKeyboardKeyStateCaps))
> ++        state = MBKeyboardKeyStateCaps;
> ++      else if (mb_kbd_key_get_obey_caps(key))
> ++        state = MBKeyboardKeyStateShifted;
> ++    }
> +
> +   if (!mb_kdb_key_has_state(key, state))
> +     {
> +diff --git a/src/matchbox-keyboard-ui-xft-backend.c
> b/src/matchbox-keyboard-ui-xft-backend.c
> +index 9a3c6d2..2790591 100644
> +--- a/src/matchbox-keyboard-ui-xft-backend.c
> ++++ b/src/matchbox-keyboard-ui-xft-backend.c
> +@@ -212,9 +212,13 @@ mb_kbd_ui_xft_redraw_key(MBKeyboardUI  *ui,
> MBKeyboardKey *key)
> +
> +   state = mb_kbd_keys_current_state(kbd);
> +
> +-  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps)
> +-      && mb_kbd_key_get_obey_caps(key))
> +-    state = MBKeyboardKeyStateShifted;
> ++  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps))
> ++    {
> ++      if (mb_kdb_key_has_state (key, MBKeyboardKeyStateCaps))
> ++        state = MBKeyboardKeyStateCaps;
> ++      else if (mb_kbd_key_get_obey_caps(key))
> ++        state = MBKeyboardKeyStateShifted;
> ++    }
> +
> +   if (!mb_kdb_key_has_state(key, state))
> +     {
> diff --git a/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb
> b/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb
> index eba1970..6d9d943 100644
> --- a/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb
> +++ b/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb
> @@ -16,6 +16,7 @@ PR = "r4"
>
>  SRC_URI = "git://git.yoctoproject.org/${BPN};branch=matchbox-keyboard-0-1
> \
>             file://0001-desktop-file-Hide-the-keyboard-from-app-list.patch
> \
> +           file://0002-add-french-keyboard.patch \
>             file://80matchboxkeyboard.sh"
>
>  S = "${WORKDIR}/git"
> --
> 2.7.4
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>

[-- Attachment #2: Type: text/html, Size: 24928 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [matchbox-keyboard][PATCH 1/1] Addition of french keyboard
  2016-05-17 12:13   ` Burton, Ross
@ 2016-05-17 13:58     ` Herve Jourdain
  2016-05-18  6:03     ` Herve Jourdain
  1 sibling, 0 replies; 7+ messages in thread
From: Herve Jourdain @ 2016-05-17 13:58 UTC (permalink / raw)
  To: 'Burton, Ross'; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 16958 bytes --]

Hi Ross,

 

Oh, OK, I’ll do that, please allow me to do it tomorrow though.

 

Herve

 

From: Burton, Ross [mailto:ross.burton@intel.com] 
Sent: mardi 17 mai 2016 14:14
To: Herve Jourdain <herve.jourdain@neuf.fr>
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] [matchbox-keyboard][PATCH 1/1] Addition of french keyboard

 

Hi Herve,

 

Can you submit the two patches (caps behaviour, and french layout) against the matchbox-keyboard-0.1 branch directly to this list please?  Then we can just bump the srcrev in the recipe instead of carrying patches against our own software.

 

Ross

 

On 17 May 2016 at 10:43, Herve Jourdain <herve.jourdain@neuf.fr <mailto:herve.jourdain@neuf.fr> > wrote:

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr <mailto:herve.jourdain@neuf.fr> >
---
 .../files/0002-add-french-keyboard.patch           | 477 +++++++++++++++++++++
 .../matchbox-keyboard/matchbox-keyboard_git.bb <http://matchbox-keyboard_git.bb>      |   1 +
 2 files changed, 478 insertions(+)
 create mode 100644 meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch

diff --git a/meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch b/meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch
new file mode 100644
index 0000000..c6dc5f7
--- /dev/null
+++ b/meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch
@@ -0,0 +1,477 @@
+diff --git a/layouts/Makefile.am b/layouts/Makefile.am
+index b439041..ed40256 100644
+--- a/layouts/Makefile.am
++++ b/layouts/Makefile.am
+@@ -1,4 +1,4 @@
+ keyboardsdir = $(datadir)/matchbox-keyboard
+ dist_keyboards_DATA = keyboard.xml keyboard-extended.xml keyboard-dvorak.xml \
+                     keyboard-us.xml keyboard-ru.xml keyboard-fi.xml        \
+-                    keyboard-numpad.xml
++                    keyboard-fr.xml keyboard-numpad.xml
+diff --git a/layouts/keyboard-fr.xml b/layouts/keyboard-fr.xml
+--- a/layouts/keyboard-fr.xml
++++ b/layouts/keyboard-fr.xml
+@@ -0,0 +1,343 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<keyboard>
++
++<!--
++
++ FR keyboard layout by Herve Jourdain <herve.jourdain@neuf.fr <mailto:herve.jourdain@neuf.fr> >
++
++-->
++
++<options>
++<!-- not yet implemented -->
++</options>
++
++<layout id="default keyboard">
++
++  <row>
++    <space width="500" extended="true"/>
++
++    <key fill="true">
++        <default display="Esc" action="escape" />
++    </key>
++    <key>
++        <default display="²" />
++        <shifted display="³" />
++    </key>
++    <key>
++        <default display="&amp;" />
++        <shifted display="1" />
++    </key>
++    <key>
++        <default display="é" />
++        <shifted display='2' />
++        <mod1 display='~' />
++        <caps display="É" />
++    </key>
++    <key>
++        <default display="&quot;" />
++        <shifted display="3" />
++        <mod1 display="#" />
++    </key>
++    <key>
++        <default display="'" />
++        <shifted display="4" />
++        <mod1 display="{" />
++    </key>
++    <key>
++        <default display="(" />
++        <shifted display="5" />
++        <mod1 display="[" />
++    </key>
++    <key>
++        <default display="-" />
++        <shifted display="6" />
++        <mod1 display="|" />
++    </key>
++    <key>
++        <default display="è" />
++        <shifted display="7" />
++        <mod1 display='`' />
++        <caps display="È" />
++    </key>
++    <key>
++        <default display="_" />
++        <shifted display="8" />
++        <mod1 display='\' />
++    </key>
++    <key>
++        <default display="ç" />
++        <shifted display="9" />
++        <mod1 display='^' />
++        <caps display="Ç" />
++    </key>
++    <key>
++        <default display="à" />
++        <shifted display="0" />
++        <mod1 display='@' />
++        <caps display="À" />
++    </key>
++    <key>
++        <default display=")" />
++        <shifted display="°" />
++        <mod1 display="]" />
++    </key>
++    <key>
++        <default display="=" />
++        <shifted display="+" />
++        <mod1 display="}" />
++    </key>
++    <key>
++        <default display="*" />
++        <shifted display="µ" />
++    </key>
++
++    <key fill="true">
++        <default display="Suppr" action="backspace"/>
++    </key>
++
++    <space width="500" extended="true"/>
++
++    <key width="4000"  extended="true">
++        <default display="Début" action="home"/>
++    </key>
++    <key width="4000"  extended="true">
++        <default display="Préc" action="pageup"/>
++    </key>
++
++    <space width="500" extended="true"/>
++  </row>
++
++  <row>
++    <space width="500" extended="true"/>
++
++    <key fill="true">
++        <default display="Tab" action="tab"/>
++    </key>
++    <key obey-caps='true'>
++        <default display="a" />
++        <shifted display="A" />
++    </key>
++    <key obey-caps='true'>
++        <default display="z" />
++        <shifted display="Z" />
++    </key>
++    <key obey-caps='true'>
++        <default display="e" />
++        <shifted display="E" />
++        <mod1 display="€" />
++    </key>
++    <key obey-caps='true'>
++        <default display="r" />
++        <shifted display="R" />
++    </key>
++    <key obey-caps='true'>
++        <default display="t" />
++        <shifted display="T" />
++    </key>
++    <key obey-caps='true'>
++        <default display="y" />
++        <shifted display="Y" />
++    </key>
++    <key obey-caps='true'>
++        <default display="u" />
++        <shifted display="U" />
++    </key>
++    <key obey-caps='true'>
++        <default display="i" />
++        <shifted display="I" />
++    </key>
++    <key obey-caps='true'>
++        <default display="o" />
++        <shifted display="O" />
++    </key>
++    <key obey-caps='true'>
++        <default display="p" />
++        <shifted display="P" />
++    </key>
++    <key>
++        <default display="^" action="xkeysym:dead_circumflex"/>
++        <shifted display="¨" action="xkeysym:dead_diaeresis"/>
++    </key>
++    <key>
++        <default display="$" />
++        <shifted display="£" />
++        <mod1 display="ø" />
++    </key>
++    <key>
++        <default display="Préc" action="pageup"/>
++    </key>
++    <key>
++        <default display="Suiv" action="pagedown"/>
++    </key>
++
++    <space width="500" extended="true"/>
++
++    <key width="4000"  extended="true">
++        <default display="Fin" action="end"/>
++    </key>
++    <key width="4000"  extended="true">
++        <default display="Suiv" action="pagedown"/>
++    </key>
++
++    <space width="500" extended="true"/>
++  </row>
++
++  <row>
++    <space width="500" extended="true"/>
++
++    <key fill="true">
++        <default display="Caps" action="modifier:caps"/>
++    </key>
++    <key obey-caps='true'>
++        <default display="q" />
++        <shifted display="Q" />
++    </key>
++    <key obey-caps='true'>
++        <default display="s" />
++        <shifted display="S" />
++    </key>
++    <key obey-caps='true'>
++        <default display="d" />
++        <shifted display="D" />
++    </key>
++    <key obey-caps='true'>
++        <default display="f" />
++        <shifted display="F" />
++    </key>
++    <key obey-caps='true'>
++        <default display="g" />
++        <shifted display="G" />
++    </key>
++    <key obey-caps='true'>
++        <default display="h" />
++        <shifted display="H" />
++    </key>
++    <key obey-caps='true'>
++        <default display="j" />
++        <shifted display="J" />
++    </key>
++    <key obey-caps='true'>
++        <default display="k" />
++        <shifted display="K" />
++    </key>
++    <key obey-caps='true'>
++        <default display="l" />
++        <shifted display="L" />
++    </key>
++    <key obey-caps='true'>
++        <default display="m" />
++        <shifted display="M" />
++    </key>
++    <key>
++        <default display="ù" />
++        <shifted display="%" />
++        <caps display="Ù" />
++    </key>
++    <key fill="true">
++        <default display="Entrée" action="return"/>
++    </key>
++
++    <space width="500" extended="true"/>
++    <space width="4000"  extended="true" />
++    <space width="4000"  extended="true" />
++    <space width="500" extended="true"/>
++  </row>
++
++  <row>
++    <space width="500" extended="true"/>
++
++    <key fill="true">
++        <default display="Maj" action="modifier:shift"/>
++    </key>
++    <key>
++        <default display="&lt;" />
++        <shifted display="&gt;" />
++    </key>
++    <key obey-caps='true'>
++        <default display="w" />
++        <shifted display="W" />
++    </key>
++    <key obey-caps='true'>
++        <default display="x" />
++        <shifted display="X" />
++    </key>
++    <key obey-caps='true'>
++        <default display="c" />
++        <shifted display="C" />
++    </key>
++    <key obey-caps='true'>
++        <default display="v" />
++        <shifted display="V" />
++    </key>
++    <key obey-caps='true'>
++        <default display="b" />
++        <shifted display="B" />
++    </key>
++    <key obey-caps='true'>
++        <default display="n" />
++        <shifted display="N" />
++    </key>
++    <key>
++        <default display="," />
++        <shifted display="?" />
++    </key>
++    <key>
++        <default display=";" />
++        <shifted display="." />
++    </key>
++    <key>
++        <default display=":" />
++        <shifted display="/" />
++    </key>
++    <key>
++        <default display="!" />
++        <shifted display="§" />
++    </key>
++    <key fill="true">
++        <default display="Maj" action="modifier:shift"/>
++    </key>
++
++    <space width="500" extended="true"/>
++    <space width="4000"  extended="true" />
++    <space width="4000"  extended="true" />
++    <space width="500" extended="true"/>
++  </row>
++
++  <row>
++    <space width="500" extended="true"/>
++
++    <key fill="true">
++        <default display="Ctrl" action="modifier:ctrl"/>
++    </key>
++    <key>
++        <default display="Alt" action="modifier:alt"/>
++    </key>
++    <key width="12000">
++        <default display=" " action="space" />
++    </key>
++    <key>
++        <default display="AGR" action="modifier:mod1"/>
++    </key>
++
++    <key>
++        <default display="&#x2191;" action="up" />
++    </key>
++    <key>
++        <default display="&#x2193;" action="down" />
++    </key>
++    <key>
++        <default display="&#x2190;" action="left" />
++    </key>
++    <key>
++        <default display="&#x2192;" action="right" />
++    </key>
++
++    <space width="500" extended="true"/>
++    <space width="4000"  extended="true" />
++    <space width="4000"  extended="true" />
++    <space width="500" extended="true"/>
++  </row>
++
++</layout>
++
++</keyboard>
+diff --git a/src/matchbox-keyboard.h b/src/matchbox-keyboard.h
+index 4dd258f..430b08b 100644
+--- a/src/matchbox-keyboard.h
++++ b/src/matchbox-keyboard.h
+@@ -116,6 +116,7 @@ typedef enum
+ {
+   MBKeyboardKeyStateNormal = 0,
+   MBKeyboardKeyStateShifted,
++  MBKeyboardKeyStateCaps,
+   MBKeyboardKeyStateMod1,
+   MBKeyboardKeyStateMod2,
+   MBKeyboardKeyStateMod3,
+diff --git a/src/matchbox-keyboard.c b/src/matchbox-keyboard.c
+index 9f9bb7d..3ed98c0 100644
+--- a/src/matchbox-keyboard.c
++++ b/src/matchbox-keyboard.c
+@@ -200,6 +200,9 @@ mb_kbd_keys_current_state(MBKeyboard *kbd)
+   if (mb_kbd_has_state(kbd, MBKeyboardStateShifted))
+     return MBKeyboardKeyStateShifted;
+
++  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps))
++    return MBKeyboardKeyStateCaps;
++
+   if (mb_kbd_has_state(kbd, MBKeyboardStateMod1))
+     return MBKeyboardKeyStateMod1;
+
+diff --git a/src/matchbox-keyboard-key.c b/src/matchbox-keyboard-key.c
+index 0555c9c..c086fbe 100644
+--- a/src/matchbox-keyboard-key.c
++++ b/src/matchbox-keyboard-key.c
+@@ -413,9 +413,13 @@ mb_kbd_key_press(MBKeyboardKey *key)
+
+   state = mb_kbd_keys_current_state(key->kbd);
+
+-  if (mb_kbd_has_state(key->kbd, MBKeyboardStateCaps)
+-      && mb_kbd_key_get_obey_caps(key))
+-    state = MBKeyboardKeyStateShifted;
++  if (mb_kbd_has_state(key->kbd, MBKeyboardStateCaps))
++  {
++    if (mb_kdb_key_has_state (key, MBKeyboardKeyStateCaps))
++      state = MBKeyboardKeyStateCaps;
++    else if (mb_kbd_key_get_obey_caps(key))
++      state = MBKeyboardKeyStateShifted;
++  }
+
+   /* XXX below fakekey mods probably better in ui */
+
+@@ -616,6 +620,7 @@ mb_kbd_key_dump_key(MBKeyboardKey *key)
+     {
+       /* MBKeyboardKeyStateNormal  */ "Normal",
+       /* MBKeyboardKeyStateShifted */ "Shifted" ,
++      /* MBKeyboardKeyStateCaps    */ "Caps" ,
+       /* MBKeyboardKeyStateMod1,    */ "Mod1" ,
+       /* MBKeyboardKeyStateMod2,    */ "Mod2" ,
+       /* MBKeyboardKeyStateMod3,    */ "Mod3"
+diff --git a/src/config-parser.c b/src/config-parser.c
+index 15a973e..13ee6d6 100644
+--- a/src/config-parser.c
++++ b/src/config-parser.c
+@@ -326,6 +326,10 @@ config_handle_key_subtag(MBKeyboardConfigState *state,
+     {
+       keystate = MBKeyboardKeyStateShifted;
+     }
++  else if (streq(tag, "caps"))
++    {
++      keystate = MBKeyboardKeyStateCaps;
++    }
+   else if (streq(tag, "mod1"))
+     {
+       keystate = MBKeyboardKeyStateMod1;
+@@ -548,6 +552,7 @@ config_xml_start_cb(void *data, const char *tag, const char **attr)
+   else if (streq(tag, "normal")
+          || streq(tag, "default")
+          || streq(tag, "shifted")
++         || streq(tag, "caps")
+          || streq(tag, "mod1")
+          || streq(tag, "mod2")
+          || streq(tag, "mod3"))
+diff --git a/src/matchbox-keyboard-ui-cairo-backend.c b/src/matchbox-keyboard-ui-cairo-backend.c
+index 3b7a401..3f15ac8 100644
+--- a/src/matchbox-keyboard-ui-cairo-backend.c
++++ b/src/matchbox-keyboard-ui-cairo-backend.c
+@@ -174,9 +174,13 @@ mb_kbd_ui_cairo_redraw_key(MBKeyboardUI  *ui, MBKeyboardKey *key)
+
+   state = mb_kbd_keys_current_state(kbd);
+
+-  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps)
+-      && mb_kbd_key_get_obey_caps(key))
+-    state = MBKeyboardKeyStateShifted;
++  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps))
++    {
++      if (mb_kdb_key_has_state (key, MBKeyboardKeyStateCaps))
++        state = MBKeyboardKeyStateCaps;
++      else if (mb_kbd_key_get_obey_caps(key))
++        state = MBKeyboardKeyStateShifted;
++    }
+
+   if (!mb_kdb_key_has_state(key, state))
+     {
+diff --git a/src/matchbox-keyboard-ui-xft-backend.c b/src/matchbox-keyboard-ui-xft-backend.c
+index 9a3c6d2..2790591 100644
+--- a/src/matchbox-keyboard-ui-xft-backend.c
++++ b/src/matchbox-keyboard-ui-xft-backend.c
+@@ -212,9 +212,13 @@ mb_kbd_ui_xft_redraw_key(MBKeyboardUI  *ui, MBKeyboardKey *key)
+
+   state = mb_kbd_keys_current_state(kbd);
+
+-  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps)
+-      && mb_kbd_key_get_obey_caps(key))
+-    state = MBKeyboardKeyStateShifted;
++  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps))
++    {
++      if (mb_kdb_key_has_state (key, MBKeyboardKeyStateCaps))
++        state = MBKeyboardKeyStateCaps;
++      else if (mb_kbd_key_get_obey_caps(key))
++        state = MBKeyboardKeyStateShifted;
++    }
+
+   if (!mb_kdb_key_has_state(key, state))
+     {
diff --git a/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb <http://matchbox-keyboard_git.bb>  b/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb <http://matchbox-keyboard_git.bb> 
index eba1970..6d9d943 100644
--- a/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb <http://matchbox-keyboard_git.bb> 
+++ b/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb <http://matchbox-keyboard_git.bb> 
@@ -16,6 +16,7 @@ PR = "r4"

 SRC_URI = "git://git.yoctoproject.org/${BPN};branch=matchbox-keyboard-0-1 <http://git.yoctoproject.org/$%7bBPN%7d;branch=matchbox-keyboard-0-1>  \
            file://0001-desktop-file-Hide-the-keyboard-from-app-list.patch <file:///\\0001-desktop-file-Hide-the-keyboard-from-app-list.patch>  \
+           file://0002-add-french-keyboard.patch <file:///\\0002-add-french-keyboard.patch>  \
            file://80matchboxkeyboard.sh <file:///\\80matchboxkeyboard.sh> "

 S = "${WORKDIR}/git"

--
2.7.4

--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org <mailto:yocto@yoctoproject.org> 
https://lists.yoctoproject.org/listinfo/yocto

 


[-- Attachment #2: Type: text/html, Size: 31697 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [matchbox-keyboard][PATCH 1/1] Addition of french keyboard
  2016-05-17 12:13   ` Burton, Ross
  2016-05-17 13:58     ` Herve Jourdain
@ 2016-05-18  6:03     ` Herve Jourdain
  2016-05-18  8:03       ` Jussi Kukkonen
  1 sibling, 1 reply; 7+ messages in thread
From: Herve Jourdain @ 2016-05-18  6:03 UTC (permalink / raw)
  To: 'Burton, Ross'; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 17421 bytes --]

Hi Ross,

 

I’ve just re-submitted the patches against the matchbox-keyboard-0-1 branch, please let me know if I missed anything while doing that.

 

I believe you’re aware there is another patch, 1 line patch, by Jussi Kukkonen, applied to matchbox-keyboard, “0001-desktop-file-Hide-the-keyboard-from-app-list.patch”, that adds “NoDisplay=true” to matchbox-keyboard.desktop.

Should anyone send it also as a patch to the branch, so it can be removed from the layer?

Similarly, shouldn’t the script 80matchboxkeyboard.sh be also added to the branch?

 

Herve

 

From: Burton, Ross [mailto:ross.burton@intel.com] 
Sent: mardi 17 mai 2016 14:14
To: Herve Jourdain <herve.jourdain@neuf.fr>
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] [matchbox-keyboard][PATCH 1/1] Addition of french keyboard

 

Hi Herve,

 

Can you submit the two patches (caps behaviour, and french layout) against the matchbox-keyboard-0.1 branch directly to this list please?  Then we can just bump the srcrev in the recipe instead of carrying patches against our own software.

 

Ross

 

On 17 May 2016 at 10:43, Herve Jourdain <herve.jourdain@neuf.fr <mailto:herve.jourdain@neuf.fr> > wrote:

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
---
 .../files/0002-add-french-keyboard.patch           | 477 +++++++++++++++++++++
 .../matchbox-keyboard/matchbox-keyboard_git.bb <http://matchbox-keyboard_git.bb>      |   1 +
 2 files changed, 478 insertions(+)
 create mode 100644 meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch

diff --git a/meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch b/meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch
new file mode 100644
index 0000000..c6dc5f7
--- /dev/null
+++ b/meta/recipes-sato/matchbox-keyboard/files/0002-add-french-keyboard.patch
@@ -0,0 +1,477 @@
+diff --git a/layouts/Makefile.am b/layouts/Makefile.am
+index b439041..ed40256 100644
+--- a/layouts/Makefile.am
++++ b/layouts/Makefile.am
+@@ -1,4 +1,4 @@
+ keyboardsdir = $(datadir)/matchbox-keyboard
+ dist_keyboards_DATA = keyboard.xml keyboard-extended.xml keyboard-dvorak.xml \
+                     keyboard-us.xml keyboard-ru.xml keyboard-fi.xml        \
+-                    keyboard-numpad.xml
++                    keyboard-fr.xml keyboard-numpad.xml
+diff --git a/layouts/keyboard-fr.xml b/layouts/keyboard-fr.xml
+--- a/layouts/keyboard-fr.xml
++++ b/layouts/keyboard-fr.xml
+@@ -0,0 +1,343 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<keyboard>
++
++<!--
++
++ FR keyboard layout by Herve Jourdain <herve.jourdain@neuf.fr <mailto:herve.jourdain@neuf.fr> >
++
++-->
++
++<options>
++<!-- not yet implemented -->
++</options>
++
++<layout id="default keyboard">
++
++  <row>
++    <space width="500" extended="true"/>
++
++    <key fill="true">
++        <default display="Esc" action="escape" />
++    </key>
++    <key>
++        <default display="²" />
++        <shifted display="³" />
++    </key>
++    <key>
++        <default display="&amp;" />
++        <shifted display="1" />
++    </key>
++    <key>
++        <default display="é" />
++        <shifted display='2' />
++        <mod1 display='~' />
++        <caps display="É" />
++    </key>
++    <key>
++        <default display="&quot;" />
++        <shifted display="3" />
++        <mod1 display="#" />
++    </key>
++    <key>
++        <default display="'" />
++        <shifted display="4" />
++        <mod1 display="{" />
++    </key>
++    <key>
++        <default display="(" />
++        <shifted display="5" />
++        <mod1 display="[" />
++    </key>
++    <key>
++        <default display="-" />
++        <shifted display="6" />
++        <mod1 display="|" />
++    </key>
++    <key>
++        <default display="è" />
++        <shifted display="7" />
++        <mod1 display='`' />
++        <caps display="È" />
++    </key>
++    <key>
++        <default display="_" />
++        <shifted display="8" />
++        <mod1 display='\' />
++    </key>
++    <key>
++        <default display="ç" />
++        <shifted display="9" />
++        <mod1 display='^' />
++        <caps display="Ç" />
++    </key>
++    <key>
++        <default display="à" />
++        <shifted display="0" />
++        <mod1 display='@' />
++        <caps display="À" />
++    </key>
++    <key>
++        <default display=")" />
++        <shifted display="°" />
++        <mod1 display="]" />
++    </key>
++    <key>
++        <default display="=" />
++        <shifted display="+" />
++        <mod1 display="}" />
++    </key>
++    <key>
++        <default display="*" />
++        <shifted display="µ" />
++    </key>
++
++    <key fill="true">
++        <default display="Suppr" action="backspace"/>
++    </key>
++
++    <space width="500" extended="true"/>
++
++    <key width="4000"  extended="true">
++        <default display="Début" action="home"/>
++    </key>
++    <key width="4000"  extended="true">
++        <default display="Préc" action="pageup"/>
++    </key>
++
++    <space width="500" extended="true"/>
++  </row>
++
++  <row>
++    <space width="500" extended="true"/>
++
++    <key fill="true">
++        <default display="Tab" action="tab"/>
++    </key>
++    <key obey-caps='true'>
++        <default display="a" />
++        <shifted display="A" />
++    </key>
++    <key obey-caps='true'>
++        <default display="z" />
++        <shifted display="Z" />
++    </key>
++    <key obey-caps='true'>
++        <default display="e" />
++        <shifted display="E" />
++        <mod1 display="€" />
++    </key>
++    <key obey-caps='true'>
++        <default display="r" />
++        <shifted display="R" />
++    </key>
++    <key obey-caps='true'>
++        <default display="t" />
++        <shifted display="T" />
++    </key>
++    <key obey-caps='true'>
++        <default display="y" />
++        <shifted display="Y" />
++    </key>
++    <key obey-caps='true'>
++        <default display="u" />
++        <shifted display="U" />
++    </key>
++    <key obey-caps='true'>
++        <default display="i" />
++        <shifted display="I" />
++    </key>
++    <key obey-caps='true'>
++        <default display="o" />
++        <shifted display="O" />
++    </key>
++    <key obey-caps='true'>
++        <default display="p" />
++        <shifted display="P" />
++    </key>
++    <key>
++        <default display="^" action="xkeysym:dead_circumflex"/>
++        <shifted display="¨" action="xkeysym:dead_diaeresis"/>
++    </key>
++    <key>
++        <default display="$" />
++        <shifted display="£" />
++        <mod1 display="ø" />
++    </key>
++    <key>
++        <default display="Préc" action="pageup"/>
++    </key>
++    <key>
++        <default display="Suiv" action="pagedown"/>
++    </key>
++
++    <space width="500" extended="true"/>
++
++    <key width="4000"  extended="true">
++        <default display="Fin" action="end"/>
++    </key>
++    <key width="4000"  extended="true">
++        <default display="Suiv" action="pagedown"/>
++    </key>
++
++    <space width="500" extended="true"/>
++  </row>
++
++  <row>
++    <space width="500" extended="true"/>
++
++    <key fill="true">
++        <default display="Caps" action="modifier:caps"/>
++    </key>
++    <key obey-caps='true'>
++        <default display="q" />
++        <shifted display="Q" />
++    </key>
++    <key obey-caps='true'>
++        <default display="s" />
++        <shifted display="S" />
++    </key>
++    <key obey-caps='true'>
++        <default display="d" />
++        <shifted display="D" />
++    </key>
++    <key obey-caps='true'>
++        <default display="f" />
++        <shifted display="F" />
++    </key>
++    <key obey-caps='true'>
++        <default display="g" />
++        <shifted display="G" />
++    </key>
++    <key obey-caps='true'>
++        <default display="h" />
++        <shifted display="H" />
++    </key>
++    <key obey-caps='true'>
++        <default display="j" />
++        <shifted display="J" />
++    </key>
++    <key obey-caps='true'>
++        <default display="k" />
++        <shifted display="K" />
++    </key>
++    <key obey-caps='true'>
++        <default display="l" />
++        <shifted display="L" />
++    </key>
++    <key obey-caps='true'>
++        <default display="m" />
++        <shifted display="M" />
++    </key>
++    <key>
++        <default display="ù" />
++        <shifted display="%" />
++        <caps display="Ù" />
++    </key>
++    <key fill="true">
++        <default display="Entrée" action="return"/>
++    </key>
++
++    <space width="500" extended="true"/>
++    <space width="4000"  extended="true" />
++    <space width="4000"  extended="true" />
++    <space width="500" extended="true"/>
++  </row>
++
++  <row>
++    <space width="500" extended="true"/>
++
++    <key fill="true">
++        <default display="Maj" action="modifier:shift"/>
++    </key>
++    <key>
++        <default display="&lt;" />
++        <shifted display="&gt;" />
++    </key>
++    <key obey-caps='true'>
++        <default display="w" />
++        <shifted display="W" />
++    </key>
++    <key obey-caps='true'>
++        <default display="x" />
++        <shifted display="X" />
++    </key>
++    <key obey-caps='true'>
++        <default display="c" />
++        <shifted display="C" />
++    </key>
++    <key obey-caps='true'>
++        <default display="v" />
++        <shifted display="V" />
++    </key>
++    <key obey-caps='true'>
++        <default display="b" />
++        <shifted display="B" />
++    </key>
++    <key obey-caps='true'>
++        <default display="n" />
++        <shifted display="N" />
++    </key>
++    <key>
++        <default display="," />
++        <shifted display="?" />
++    </key>
++    <key>
++        <default display=";" />
++        <shifted display="." />
++    </key>
++    <key>
++        <default display=":" />
++        <shifted display="/" />
++    </key>
++    <key>
++        <default display="!" />
++        <shifted display="§" />
++    </key>
++    <key fill="true">
++        <default display="Maj" action="modifier:shift"/>
++    </key>
++
++    <space width="500" extended="true"/>
++    <space width="4000"  extended="true" />
++    <space width="4000"  extended="true" />
++    <space width="500" extended="true"/>
++  </row>
++
++  <row>
++    <space width="500" extended="true"/>
++
++    <key fill="true">
++        <default display="Ctrl" action="modifier:ctrl"/>
++    </key>
++    <key>
++        <default display="Alt" action="modifier:alt"/>
++    </key>
++    <key width="12000">
++        <default display=" " action="space" />
++    </key>
++    <key>
++        <default display="AGR" action="modifier:mod1"/>
++    </key>
++
++    <key>
++        <default display="&#x2191;" action="up" />
++    </key>
++    <key>
++        <default display="&#x2193;" action="down" />
++    </key>
++    <key>
++        <default display="&#x2190;" action="left" />
++    </key>
++    <key>
++        <default display="&#x2192;" action="right" />
++    </key>
++
++    <space width="500" extended="true"/>
++    <space width="4000"  extended="true" />
++    <space width="4000"  extended="true" />
++    <space width="500" extended="true"/>
++  </row>
++
++</layout>
++
++</keyboard>
+diff --git a/src/matchbox-keyboard.h b/src/matchbox-keyboard.h
+index 4dd258f..430b08b 100644
+--- a/src/matchbox-keyboard.h
++++ b/src/matchbox-keyboard.h
+@@ -116,6 +116,7 @@ typedef enum
+ {
+   MBKeyboardKeyStateNormal = 0,
+   MBKeyboardKeyStateShifted,
++  MBKeyboardKeyStateCaps,
+   MBKeyboardKeyStateMod1,
+   MBKeyboardKeyStateMod2,
+   MBKeyboardKeyStateMod3,
+diff --git a/src/matchbox-keyboard.c b/src/matchbox-keyboard.c
+index 9f9bb7d..3ed98c0 100644
+--- a/src/matchbox-keyboard.c
++++ b/src/matchbox-keyboard.c
+@@ -200,6 +200,9 @@ mb_kbd_keys_current_state(MBKeyboard *kbd)
+   if (mb_kbd_has_state(kbd, MBKeyboardStateShifted))
+     return MBKeyboardKeyStateShifted;
+
++  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps))
++    return MBKeyboardKeyStateCaps;
++
+   if (mb_kbd_has_state(kbd, MBKeyboardStateMod1))
+     return MBKeyboardKeyStateMod1;
+
+diff --git a/src/matchbox-keyboard-key.c b/src/matchbox-keyboard-key.c
+index 0555c9c..c086fbe 100644
+--- a/src/matchbox-keyboard-key.c
++++ b/src/matchbox-keyboard-key.c
+@@ -413,9 +413,13 @@ mb_kbd_key_press(MBKeyboardKey *key)
+
+   state = mb_kbd_keys_current_state(key->kbd);
+
+-  if (mb_kbd_has_state(key->kbd, MBKeyboardStateCaps)
+-      && mb_kbd_key_get_obey_caps(key))
+-    state = MBKeyboardKeyStateShifted;
++  if (mb_kbd_has_state(key->kbd, MBKeyboardStateCaps))
++  {
++    if (mb_kdb_key_has_state (key, MBKeyboardKeyStateCaps))
++      state = MBKeyboardKeyStateCaps;
++    else if (mb_kbd_key_get_obey_caps(key))
++      state = MBKeyboardKeyStateShifted;
++  }
+
+   /* XXX below fakekey mods probably better in ui */
+
+@@ -616,6 +620,7 @@ mb_kbd_key_dump_key(MBKeyboardKey *key)
+     {
+       /* MBKeyboardKeyStateNormal  */ "Normal",
+       /* MBKeyboardKeyStateShifted */ "Shifted" ,
++      /* MBKeyboardKeyStateCaps    */ "Caps" ,
+       /* MBKeyboardKeyStateMod1,    */ "Mod1" ,
+       /* MBKeyboardKeyStateMod2,    */ "Mod2" ,
+       /* MBKeyboardKeyStateMod3,    */ "Mod3"
+diff --git a/src/config-parser.c b/src/config-parser.c
+index 15a973e..13ee6d6 100644
+--- a/src/config-parser.c
++++ b/src/config-parser.c
+@@ -326,6 +326,10 @@ config_handle_key_subtag(MBKeyboardConfigState *state,
+     {
+       keystate = MBKeyboardKeyStateShifted;
+     }
++  else if (streq(tag, "caps"))
++    {
++      keystate = MBKeyboardKeyStateCaps;
++    }
+   else if (streq(tag, "mod1"))
+     {
+       keystate = MBKeyboardKeyStateMod1;
+@@ -548,6 +552,7 @@ config_xml_start_cb(void *data, const char *tag, const char **attr)
+   else if (streq(tag, "normal")
+          || streq(tag, "default")
+          || streq(tag, "shifted")
++         || streq(tag, "caps")
+          || streq(tag, "mod1")
+          || streq(tag, "mod2")
+          || streq(tag, "mod3"))
+diff --git a/src/matchbox-keyboard-ui-cairo-backend.c b/src/matchbox-keyboard-ui-cairo-backend.c
+index 3b7a401..3f15ac8 100644
+--- a/src/matchbox-keyboard-ui-cairo-backend.c
++++ b/src/matchbox-keyboard-ui-cairo-backend.c
+@@ -174,9 +174,13 @@ mb_kbd_ui_cairo_redraw_key(MBKeyboardUI  *ui, MBKeyboardKey *key)
+
+   state = mb_kbd_keys_current_state(kbd);
+
+-  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps)
+-      && mb_kbd_key_get_obey_caps(key))
+-    state = MBKeyboardKeyStateShifted;
++  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps))
++    {
++      if (mb_kdb_key_has_state (key, MBKeyboardKeyStateCaps))
++        state = MBKeyboardKeyStateCaps;
++      else if (mb_kbd_key_get_obey_caps(key))
++        state = MBKeyboardKeyStateShifted;
++    }
+
+   if (!mb_kdb_key_has_state(key, state))
+     {
+diff --git a/src/matchbox-keyboard-ui-xft-backend.c b/src/matchbox-keyboard-ui-xft-backend.c
+index 9a3c6d2..2790591 100644
+--- a/src/matchbox-keyboard-ui-xft-backend.c
++++ b/src/matchbox-keyboard-ui-xft-backend.c
+@@ -212,9 +212,13 @@ mb_kbd_ui_xft_redraw_key(MBKeyboardUI  *ui, MBKeyboardKey *key)
+
+   state = mb_kbd_keys_current_state(kbd);
+
+-  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps)
+-      && mb_kbd_key_get_obey_caps(key))
+-    state = MBKeyboardKeyStateShifted;
++  if (mb_kbd_has_state(kbd, MBKeyboardStateCaps))
++    {
++      if (mb_kdb_key_has_state (key, MBKeyboardKeyStateCaps))
++        state = MBKeyboardKeyStateCaps;
++      else if (mb_kbd_key_get_obey_caps(key))
++        state = MBKeyboardKeyStateShifted;
++    }
+
+   if (!mb_kdb_key_has_state(key, state))
+     {
diff --git a/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb <http://matchbox-keyboard_git.bb>  b/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb <http://matchbox-keyboard_git.bb> 
index eba1970..6d9d943 100644
--- a/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb <http://matchbox-keyboard_git.bb> 
+++ b/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb <http://matchbox-keyboard_git.bb> 
@@ -16,6 +16,7 @@ PR = "r4"

 SRC_URI = "git://git.yoctoproject.org/${BPN};branch=matchbox-keyboard-0-1 <http://git.yoctoproject.org/$%7bBPN%7d;branch=matchbox-keyboard-0-1>  \
            file://0001-desktop-file-Hide-the-keyboard-from-app-list.patch <file:///\\0001-desktop-file-Hide-the-keyboard-from-app-list.patch>  \
+           file://0002-add-french-keyboard.patch <file:///\\0002-add-french-keyboard.patch>  \
            file://80matchboxkeyboard.sh <file:///\\80matchboxkeyboard.sh> "

 S = "${WORKDIR}/git"

--
2.7.4

--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org <mailto:yocto@yoctoproject.org> 
https://lists.yoctoproject.org/listinfo/yocto

 


[-- Attachment #2: Type: text/html, Size: 32832 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [matchbox-keyboard][PATCH 1/1] Addition of french keyboard
  2016-05-18  6:03     ` Herve Jourdain
@ 2016-05-18  8:03       ` Jussi Kukkonen
  0 siblings, 0 replies; 7+ messages in thread
From: Jussi Kukkonen @ 2016-05-18  8:03 UTC (permalink / raw)
  To: Herve Jourdain; +Cc: Yocto Project

On 18 May 2016 at 09:03, Herve Jourdain <herve.jourdain@neuf.fr> wrote:
> I believe you’re aware there is another patch, 1 line patch, by Jussi
> Kukkonen, applied to matchbox-keyboard,
> “0001-desktop-file-Hide-the-keyboard-from-app-list.patch”, that adds
> “NoDisplay=true” to matchbox-keyboard.desktop.
>
> Should anyone send it also as a patch to the branch, so it can be removed
> from the layer?
>
> Similarly, shouldn’t the script 80matchboxkeyboard.sh be also added to the
> branch?

I suppose there are few matchbox-keyboard users outside of oe-core,
but 80matchboxkeyboard.sh is definitely a oe-core specific script and
installing that from the upstream project would be a bit rude to the
hypothetical non-oecore user.

The “NoDisplay=true” patch is more debatable but I think my reasoning
back then was the same: it was a oe-core configuration decision.

Jussi


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [matchbox-keyboard][PATCH 0/1] Addition of french keyboard
@ 2016-05-18  5:33 Herve Jourdain
  0 siblings, 0 replies; 7+ messages in thread
From: Herve Jourdain @ 2016-05-18  5:33 UTC (permalink / raw)
  To: yocto

The layout added is the one for French (France).
The behaviour for the CAPS keys is the same as Ubuntu (which is different from the behaviour in Windows).
This layout uses the "caps" tag, that sets the value of the key when the CAPS action modifier is in effect.
Tests have been done using sato.

Herve Jourdain (1):
  Addition of french keyboard

 layouts/Makefile.am     |   2 +-
 layouts/keyboard-fr.xml | 343 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 344 insertions(+), 1 deletion(-)
 create mode 100644 layouts/keyboard-fr.xml

-- 
2.7.4



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-05-18  8:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-17  9:43 [matchbox-keyboard][PATCH 0/1] Addition of french keyboard Herve Jourdain
2016-05-17  9:43 ` [matchbox-keyboard][PATCH 1/1] " Herve Jourdain
2016-05-17 12:13   ` Burton, Ross
2016-05-17 13:58     ` Herve Jourdain
2016-05-18  6:03     ` Herve Jourdain
2016-05-18  8:03       ` Jussi Kukkonen
2016-05-18  5:33 [matchbox-keyboard][PATCH 0/1] " Herve Jourdain

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.