diff -urN -X /usr/src/maemo/xclude orig/him-arabic/src/him-arabic.cc him-arabic/src/him-arabic.cc
--- orig/him-arabic/src/him-arabic.cc	2008-03-28 19:58:32.000000000 +0300
+++ him-arabic/src/him-arabic.cc	2008-03-28 19:42:50.000000000 +0300
@@ -42,7 +42,7 @@
   if (init == TRUE) {
     hildon_im_ui_button_set_sensitive(priv->ui, HILDON_IM_BUTTON_MODE_A, TRUE);
     hildon_im_ui_button_set_sensitive(priv->ui, HILDON_IM_BUTTON_MODE_B, TRUE);
-    hildon_im_ui_button_set_sensitive(priv->ui, HILDON_IM_BUTTON_SPECIAL_CHAR, FALSE);
+    hildon_im_ui_button_set_sensitive(priv->ui, HILDON_IM_BUTTON_SPECIAL_CHAR, TRUE);
     hildon_im_ui_button_set_toggle(priv->ui,
 				   HILDON_IM_BUTTON_MODE_A, TRUE);
     hildon_im_ui_button_set_toggle(priv->ui,
@@ -51,6 +51,8 @@
 				  HILDON_IM_BUTTON_MODE_A, "EN");
     hildon_im_ui_button_set_label(priv->ui,
 				  HILDON_IM_BUTTON_MODE_B, "Shift");
+    hildon_im_ui_button_set_label(priv->ui,
+				  HILDON_IM_BUTTON_SPECIAL_CHAR, "Lock");
   }
 
   hildon_im_ui_send_communication_message(priv->ui,
@@ -105,6 +107,18 @@
   }
 }
 
+void him_arabic_button_activated(HildonIMPlugin *pl,
+                                 HildonIMButton button,
+                                 gboolean long_press) {
+	if(button==HILDON_IM_BUTTON_SPECIAL_CHAR) {
+		if (HIM_ARABIC(pl)->mode_a) {
+			him_arabic_reset_layouts(HIM_ARABIC(pl), "en");
+		} else {
+			him_arabic_reset_layouts(HIM_ARABIC(pl));
+  		}
+	}
+}
+
 void him_arabic_settings_changed(HildonIMPlugin *pl, const gchar *key, const GConfValue *val) {
   if ((key) && (!strcmp(key, "/apps/osso/inputmethod/hildon-im-languages/current"))) {
     him_arabic_reset_layouts(HIM_ARABIC(pl));
diff -urN -X /usr/src/maemo/xclude orig/him-arabic/src/him-arabic.hh him-arabic/src/him-arabic.hh
--- orig/him-arabic/src/him-arabic.hh	2008-03-28 19:58:32.000000000 +0300
+++ him-arabic/src/him-arabic.hh	2008-03-28 19:42:41.000000000 +0300
@@ -39,6 +39,9 @@
 extern "C" void him_arabic_language(HildonIMPlugin *);
 extern "C" void him_arabic_mode_a(HildonIMPlugin *);
 extern "C" void him_arabic_mode_b(HildonIMPlugin *);
+extern "C" void him_arabic_button_activated(HildonIMPlugin *pl,
+                                 HildonIMButton button,
+                                 gboolean long_press);
 extern "C" void him_arabic_language_settings_changed(HildonIMPlugin *, gint);
 extern "C" void him_arabic_settings_changed(HildonIMPlugin *, const gchar *, const GConfValue *);
 
diff -urN -X /usr/src/maemo/xclude orig/him-arabic/src/plugin.cc him-arabic/src/plugin.cc
--- orig/him-arabic/src/plugin.cc	2008-03-28 19:58:32.000000000 +0300
+++ him-arabic/src/plugin.cc	2008-03-28 19:38:07.000000000 +0300
@@ -168,7 +168,9 @@
 
 void him_arabic_activate_layout(HimArabic *har, std::map<LayoutType, GtkWidget *>& layout) {
   std::map<LayoutType, GtkWidget *>::iterator iter;
-  if (har->mode_b) {
+  if (har->mode_b^
+	hildon_im_ui_button_get_active(HIM_ARABIC_GET_PRIVATE(har)->ui, HILDON_IM_BUTTON_SPECIAL_CHAR)
+) {
     iter = layout.find(LAYOUT_B);
   }
   else {
@@ -195,6 +197,17 @@
 
 static void him_arabic_clicked_cb(GtkButton *button, gpointer user_data) {
   hildon_im_ui_send_utf8(HIM_ARABIC_GET_PRIVATE((HimArabic *)user_data)->ui, gtk_label_get_text(GTK_LABEL(GTK_BIN(button)->child)));
+  if(hildon_im_ui_button_get_active(HIM_ARABIC_GET_PRIVATE((HimArabic *)user_data)->ui, HILDON_IM_BUTTON_MODE_B)) {
+  	hildon_im_ui_button_set_active(HIM_ARABIC_GET_PRIVATE((HimArabic *)user_data)->ui, HILDON_IM_BUTTON_MODE_B, false);
+			
+	((HimArabic *)user_data)->mode_b = false;
+	if (((HimArabic *)user_data)->mode_a) {
+		him_arabic_reset_layouts(((HimArabic *)user_data), "en");
+	}
+	else {
+		him_arabic_reset_layouts(((HimArabic *)user_data));
+	}
+  }
 }
 
 static void him_arabic_finalize(GObject *obj) {
@@ -219,6 +232,7 @@
   iface->mode_b = him_arabic_mode_b;
   iface->language_settings_changed = him_arabic_language_settings_changed;
   iface->settings_changed = him_arabic_settings_changed;
+  iface->button_activated = him_arabic_button_activated;
 }
 
 GtkWidget *him_arabic_new(HildonIMUI *ui) {
diff -urN -X /usr/src/maemo/xclude orig/him-arabic/data/en.xml him-arabic/data/en.xml
--- orig/him-arabic/data/en.xml	2008-03-28 19:58:33.000000000 +0300
+++ him-arabic/data/en.xml	2008-03-28 19:50:51.000000000 +0300
@@ -56,6 +56,9 @@
 <key name="?" expand="0" />
 </row>
 <row>
+<key name="[" expand="0" />
+<key name="]" expand="0" />
+<key name="~" expand="0" />
 <key name=" " expand="1" />
 </row>
 </layout>
@@ -116,6 +119,9 @@
 <key name="~" expand="0" />
 </row>
 <row>
+<key name="{" expand="0" />
+<key name="}" expand="0" />
+<key name="`" expand="0" />
 <key name=" " expand="1" />
 </row>
 </layout>
diff -urN -X /usr/src/maemo/xclude orig/him-arabic/data/he.xml him-arabic/data/he.xml
--- orig/him-arabic/data/he.xml	1970-01-01 02:00:00.000000000 +0200
+++ him-arabic/data/he.xml	2008-03-28 19:50:45.000000000 +0300
@@ -0,0 +1,100 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<him-arabic>
+<layout mode_b="0">
+<row>
+<key name="/" expand="0" />
+<key name="'" expand="0" />
+<key name="ק" expand="0" />
+<key name="ר" expand="0" />
+<key name="א" expand="0" />
+<key name="ט" expand="0" />
+<key name="ו" expand="0" />
+<key name="ן" expand="0" />
+<key name="ם" expand="0" />
+<key name="פ" expand="0" />
+<key name=")" expand="0" />
+<key name="(" expand="0" />
+</row>
+<row>
+<key name="ש" expand="0" />
+<key name="ד" expand="0" />
+<key name="ג" expand="0" />
+<key name="כ" expand="0" />
+<key name="ע" expand="0" />
+<key name="י" expand="0" />
+<key name="ח" expand="0" />
+<key name="ל" expand="0" />
+<key name="ך" expand="0" />
+<key name="ף" expand="0" />
+<key name="," expand="0" />
+</row>
+<row>
+<key name="ז" expand="0" />
+<key name="ס" expand="0" />
+<key name="ב" expand="0" />
+<key name="ה" expand="0" />
+<key name="נ" expand="0" />
+<key name="מ" expand="0" />
+<key name="צ" expand="0" />
+<key name="ת" expand="0" />
+<key name="ץ" expand="0" />
+<key name="." expand="0" />
+</row>
+<row>
+<key name=":" expand="0" />
+<key name="-" expand="0" />
+<key name="?" expand="0" />
+<key name=" " expand="1" />
+</row>
+</layout>
+<layout mode_b="1">
+<row>
+<key name="1" expand="0" />
+<key name="2" expand="0" />
+<key name="3" expand="0" />
+<key name="4" expand="0" />
+<key name="5" expand="0" />
+<key name="6" expand="0" />
+<key name="7" expand="0" />
+<key name="8" expand="0" />
+<key name="9" expand="0" />
+<key name="0" expand="0" />
+<key name="=" expand="0" />
+<key name="-" expand="0" />
+<key name="!" expand="0" />
+<key name="@" expand="0" />
+</row>
+<row>
+<key name="[" expand="0" />
+<key name="]" expand="0" />
+<key name="{" expand="0" />
+<key name="}" expand="0" />
+<key name="|" expand="0" />
+<key name="~" expand="0" />
+<key name="`" expand="0" />
+<key name="#" expand="0" />
+<key name="$" expand="0" />
+<key name="%" expand="0" />
+<key name="^" expand="0" />
+</row>
+<row>
+<key name="&amp;" expand="0" />
+<key name="*" expand="0" />
+<key name="(" expand="0" />
+<key name=")" expand="0" />
+<key name="_" expand="0" />
+<key name="+" expand="0" />
+<key name="'" expand="0" />
+<key name=":" expand="0" />
+<key name=";" expand="0" />
+<key name="&quot;" expand="0" />
+<key name="&lt;" expand="0" />
+<key name=">" expand="0" />
+<key name="\" expand="0" />
+</row>
+<row>
+<key name=" " expand="1" />
+</row>
+</layout>
+
+</him-arabic>
