? action.log
? ascii_patch.patch
? big_ascii_patch.patch
? keycodes.patch
? more_chars.patch
? patch.patch
? small_ascii_patch.patch
? gui/Info.plist
? libltdl/COPYING.LIB
? libltdl/Makefile.am
? libltdl/Makefile.in
? libltdl/README
? libltdl/acinclude.m4
? libltdl/aclocal.m4
? libltdl/config-h.in
? libltdl/config.guess
? libltdl/config.sub
? libltdl/configure
? libltdl/configure.ac
? libltdl/install-sh
? libltdl/ltdl.c
? libltdl/ltdl.h
? libltdl/ltmain.sh
? libltdl/missing
Index: gui/gtk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
retrieving revision 1.107
diff -u -r1.107 gtk.cpp
--- gui/gtk.cpp	11 Sep 2007 15:35:42 -0000	1.107
+++ gui/gtk.cpp	11 Sep 2007 19:43:40 -0000
@@ -1518,7 +1518,7 @@
     int mod = gdk_to_gnash_modifier(event->state);
     
     if (c != gnash::key::INVALID) {
-        gui->notify_key_event(c, mod, true);
+        gui->notify_key_event(c, gdk_keyval_to_unicode(event->keyval), mod, true);
     }
         
     return true;
@@ -1539,7 +1539,7 @@
     int mod = gdk_to_gnash_modifier(event->state);
     
     if (c != gnash::key::INVALID) {
-        gui->notify_key_event(c, mod, false);
+        gui->notify_key_event(c, gdk_keyval_to_unicode(event->keyval), mod, false);
     }
     
     return true;
Index: gui/gui.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.cpp,v
retrieving revision 1.94
diff -u -r1.94 gui.cpp
--- gui/gui.cpp	22 Aug 2007 21:38:22 -0000	1.94
+++ gui/gui.cpp	11 Sep 2007 19:43:40 -0000
@@ -312,11 +312,11 @@
 }
 
 void
-Gui::notify_key_event(gnash::key::code k, int modifier, bool pressed) 
+Gui::notify_key_event(gnash::key::code k, uint32_t utf_8, int modifier, bool pressed) 
 {
 	movie_root* m = get_current_root();
 
-	if ( m->notify_key_event(k, pressed) )
+	if ( m->notify_key_event(k, utf_8, pressed) )
 	{
 		// any action triggered by the
 		// event required screen refresh
Index: gui/gui.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.h,v
retrieving revision 1.60
diff -u -r1.60 gui.h
--- gui/gui.h	22 Aug 2007 21:38:22 -0000	1.60
+++ gui/gui.h	11 Sep 2007 19:43:41 -0000
@@ -182,7 +182,7 @@
     /// @param pressed Determines whether the key is being
     ///           pressed (true) or being released (false)
     ///
-    void notify_key_event(gnash::key::code k, int modifier, bool pressed);
+    void notify_key_event(gnash::key::code k, uint32_t utf_8, int modifier, bool pressed);
 
     /// Resize the client area view and the window accordingly.
     //
Index: server/movie_root.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.cpp,v
retrieving revision 1.85
diff -u -r1.85 movie_root.cpp
--- server/movie_root.cpp	7 Sep 2007 11:56:06 -0000	1.85
+++ server/movie_root.cpp	11 Sep 2007 19:43:41 -0000
@@ -290,7 +290,7 @@
 
 
 key_as_object *
-movie_root::notify_global_key(key::code k, bool down)
+movie_root::notify_global_key(key::code k, uint32_t utf_8, bool down)
 {
 	VM& vm = VM::get();
 	if ( vm.getSWFVersion() < 5 )
@@ -302,7 +302,7 @@
 	boost::intrusive_ptr<key_as_object> keyobject = getKeyObject();
 	if ( keyobject )
 	{
-		if (down) _keyobject->set_key_down(k);
+		if (down) _keyobject->set_key_down(k, utf_8);
 		else _keyobject->set_key_up(k);
 	}
 	else
@@ -314,14 +314,14 @@
 }
 
 bool
-movie_root::notify_key_event(key::code k, bool down)
+movie_root::notify_key_event(key::code k, uint32_t utf_8, bool down)
 {
 //GNASH_REPORT_FUNCTION;
 
 	//
 	// First of all, notify the _global.Key object about key event
 	//
-	key_as_object * global_key = notify_global_key(k, down);
+	key_as_object * global_key = notify_global_key(k, utf_8, down);
 
 	// Notify character key listeners.
 	notify_key_listeners(k, down);
@@ -922,7 +922,7 @@
 #endif
 }
 
-void movie_root::notify_key_listeners(key::code k, bool down)
+void movie_root::notify_key_listeners(key::code k, uint32_t utf_8, bool down)
 {
 	log_msg("Notifying " SIZET_FMT " keypress listeners", 
 		m_key_listeners.size());
Index: server/movie_root.h
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.h,v
retrieving revision 1.71
diff -u -r1.71 movie_root.h
--- server/movie_root.h	1 Sep 2007 01:20:46 -0000	1.71
+++ server/movie_root.h	11 Sep 2007 19:43:41 -0000
@@ -332,7 +332,7 @@
     /// by the event requires redraw, see \ref events_handling for
     /// more info.
     ///
-    bool notify_key_event(key::code k, bool down);
+    bool notify_key_event(key::code k, uint32_t utf_8, bool down);
 
     /// \brief
     /// Use this to retrieve the last state of the mouse, as set via
@@ -556,7 +556,7 @@
     void executeTimers();
 
     /// Notify the global Key ActionScript object about a key status change
-    key_as_object * notify_global_key(key::code k, bool down);
+    key_as_object * notify_global_key(key::code k, uint32_t utf_8, bool down);
     
     /// Remove all listeners with a ref-count of 1
     /// (only referenced as key listeners)
Index: server/asobj/Key.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Key.cpp,v
retrieving revision 1.31
diff -u -r1.31 Key.cpp
--- server/asobj/Key.cpp	31 Aug 2007 21:53:32 -0000	1.31
+++ server/asobj/Key.cpp	11 Sep 2007 19:43:41 -0000
@@ -72,12 +72,14 @@
 }
 
 void
-key_as_object::set_key_down(int code)
+key_as_object::set_key_down(int code, uint32_t utf_8)
 {
     if (code < 0 || code >= key::KEYCOUNT) return;
 
     m_last_key_pressed = code;
 
+    m_last_unicode = utf_8;
+
     int byte_index = code >> 3;
     int bit_index = code - (byte_index << 3);
     int mask = 1 << bit_index;
@@ -198,6 +200,11 @@
     return m_last_key_pressed;
 }
 
+uint32_t
+key_as_object::get_last_unicode() const
+{
+    return m_last_unicode;
+}
 
 as_value
 key_add_listener(const fn_call& fn)
@@ -243,19 +250,13 @@
 {
     boost::intrusive_ptr<key_as_object> ko = ensureType<key_as_object>(fn.this_ptr);
 
-    int code = ko->get_last_key_pressed();
-    if (code < 0)
-        return as_value();
+    if (ko->get_last_key_pressed() < 0 ) return as_value();
 
-    // @@ Crude for now; just jamming the key code in a string, as a character.
-    // Need to apply shift/capslock/numlock, etc...
-    char    buf[2];
-    buf[0] = (char) code;
-    buf[1] = 0;
+    int utf8 = ko->get_last_unicode();
 
-    log_unimpl("Key.getAscii partially implemented");
+    if (utf8 < 0) return as_value();
 
-    return as_value(buf);
+    return as_value(int(utf8));
 }
 
 // Returns the keycode of the last key pressed.
Index: server/asobj/Key.h
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Key.h,v
retrieving revision 1.24
diff -u -r1.24 Key.h
--- server/asobj/Key.h	24 Jul 2007 14:19:32 -0000	1.24
+++ server/asobj/Key.h	11 Sep 2007 19:43:41 -0000
@@ -63,6 +63,7 @@
 #endif
 
 	int	m_last_key_pressed;
+	uint32_t m_last_unicode;
 
 protected:
 
@@ -81,7 +82,7 @@
 
 	bool is_key_down(int code);
 
-	void set_key_down(int code);
+	void set_key_down(int code, uint32_t utf_8);
 
 	void set_key_up(int code);
 	
@@ -103,6 +104,8 @@
 
 	int get_last_key_pressed() const;
 
+	uint32_t get_last_unicode() const;
+
 };
 
 void key_class_init(as_object& global);
