[PHP-BUG] Bug #53813 [NEW]: GdkEvent keyval field not writable

[email protected] ("ptlis at ptlis dot net") Sat, 22 Jan 2011 14:10:12 +0100 (CET)
Newsgroups php.gtk.dev
Message-ID <[email protected]>
From:             
Operating system: Linux 32bit
PHP version:      5.3.5
Package:          PHP-GTK related
Bug Type:         Bug
Bug description:GdkEvent keyval field not writable

Description:
------------
If you create a GdkEvent with the GdkEventType Gdk::KEY_PRESS and try to
assign a value to the keyval field the keyval field does not change.

Test script:
---------------
$event = new GdkEvent(Gdk::KEY_PRESS);
$event->keyval	= Gdk::KEY_Return;
var_dump($event);

Expected result:
----------------
object(GdkEvent)#4466 (9) {
  ["keyval"]=>
  int(65293)
  ["time"]=>
  int(0)
  ["state"]=>
  int(0)
  ["string"]=>
  string(0) ""
  ["hardware_keycode"]=>
  int(0)
  ["group"]=>
  int(0)
  ["type"]=>
  int(8)
  ["window"]=>
  NULL
  ["send_event"]=>
  bool(false)
}


Actual result:
--------------
object(GdkEvent)#4466 (9) {
  ["keyval"]=>
  int(0)
  ["time"]=>
  int(0)
  ["state"]=>
  int(0)
  ["string"]=>
  string(0) ""
  ["hardware_keycode"]=>
  int(0)
  ["group"]=>
  int(0)
  ["type"]=>
  int(8)
  ["window"]=>
  NULL
  ["send_event"]=>
  bool(false)
}


-- 
Edit bug report at http://bugs.php.net/bug.php?id=53813&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=53813&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=53813&r=trysnapshot53
Try a snapshot (trunk):              http://bugs.php.net/fix.php?id=53813&r=trysnapshottrunk
Fixed in SVN:                        http://bugs.php.net/fix.php?id=53813&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53813&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=53813&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=53813&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=53813&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=53813&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=53813&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=53813&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=53813&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=53813&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=53813&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53813&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53813&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=53813&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=53813&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=53813&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=53813&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=53813&r=mysqlcfg