From 3742110ce50e56f7407d426c4264b504eadcf454 Mon Sep 17 00:00:00 2001 From: "g2@giantshoulder.com" Date: Mon, 21 Mar 2005 15:07:49 +0000 Subject: Merge nslu2-linux@nslu2-linux.bkbits.net:openembedded into giantshoulder.com:/home/tom/dev/openslug/openembedded 2005/03/21 06:41:26-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/21 15:00:24+01:00 handhelds.org!CoreDump Update netbase from 4.19 to 4.20 since 4.19 vanished upstream 2005/03/21 05:41:23-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/21 13:35:17+00:00 rpsys.net!RP Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into tim.rpsys.net:/usr/oe/openembedded 2005/03/21 13:34:55+00:00 rpsys.net!RP openzaurus-2.6: Compile fixes from Dirk for tosa 2005/03/21 04:41:24-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/21 13:05:52+01:00 utwente.nl!koen kbdd_cvs.bb: Apply patch from Paul Eggleton 2005/03/21 03:41:22-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/21 12:41:15+01:00 utwente.nl!koen Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into bitbake.utwente.nl:/home/koen/OE/openembedded 2005/03/21 12:40:56+01:00 utwente.nl!koen matchbox-themes-extra_0.3.bb: hh.org -> o-hand.com 2005/03/21 12:27:55+01:00 uni-frankfurt.de!mickeyl update updater.sh for c3000 2005/03/21 21:50:32+10:30 (none)!rwhitby Unslung 4.6-alpha 2005/03/21 12:19:50+01:00 uni-frankfurt.de!mickeyl Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into r2d2.tm.informatik.uni-frankfurt.de:/local/pkg/oe/packages 2005/03/21 12:19:34+01:00 uni-frankfurt.de!mickeyl upgrade cumulus to 1.2.1 and lower the default preference of the cvs version 2005/03/21 21:45:32+10:30 (none)!rwhitby Fixed unslung-packages 2005/03/21 21:37:40+10:30 (none)!rwhitby Merge bk://nslu2-linux@nslu2-linux.bkbits.net/openembedded into home.(none):/home/bitbake/openembedded 2005/03/21 21:36:04+10:30 (none)!rwhitby Updated unsling script to support external rootfs in Unslung distro 2005/03/21 10:57:51+00:00 rpsys.net!RP Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into tim.rpsys.net:/usr/oe/openembedded 2005/03/21 10:57:29+00:00 rpsys.net!RP linux-hotplug: Update mmc.agent to work with 2.6 kernels + udev 2005/03/21 02:41:25-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/21 11:23:54+01:00 utwente.nl!koen xcursor-transparent-theme_0.1.1.bb: hh.org -> o-hand.com 2005/03/21 01:41:23-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/21 20:33:14+10:30 (none)!rwhitby Added DISTRO_TYPE to Unslung and OpenSlug 2005/03/21 10:47:07+01:00 utwente.nl!koen task-bootstrap.bb: use base-passwd-3.5.9 2005/03/21 10:23:06+01:00 handhelds.org!CoreDump Fix PR... 2005/03/21 10:21:57+01:00 handhelds.org!CoreDump Upgrade base-passwd from 3.5.7 to 3.5.9 as 3.5.7 is no longer available from upstream 2005/03/20 23:03:22-10:00 (none)!dyoung device_table-unslung.txt: Add /dev/video0 2005/03/20 22:51:31-10:00 (none)!dyoung Merge bk://nslu2-linux@nslu2-linux.bkbits.net/openembedded into builder.(none):/home/dereky/bbroot/openembedded 2005/03/20 22:50:35-10:00 (none)!dyoung Oops forgot to enable the camera device 2005/03/21 00:41:23-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/20 22:37:46-10:00 (none)!dyoung defconfig: Enable video_dev=m and bring config up to post-config standard. 2005/03/21 09:15:32+01:00 mn-solutions.de!schurig openswan: download URL fix from Gints Polis 2005/03/21 09:13:51+01:00 mn-solutions.de!schurig Qt/E 2.3.10: Changed ramses-keyboard.patch from patch to copy-a-file mode. It happend one time too often that someone else broke my patch. 2005/03/20 16:23:39-10:00 (none)!dyoung Update the version to spca5xx camera driver 2005/03/20 16:41:28-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/21 00:25:15+00:00 rpsys.net!RP Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into tim.rpsys.net:/usr/oe/openembedded 2005/03/21 00:24:56+00:00 rpsys.net!RP openzaurus-2.6: Fix the mtd mapped PROM driver so it works and add definitions for tosa/spitz to it (patch commited to MTD CVS). 2005/03/20 13:52:55-10:00 (none)!dyoung Merge bk://nslu2-linux@nslu2-linux.bkbits.net/openembedded into builder.(none):/home/dereky/bbroot/openembedded 2005/03/20 13:51:25-10:00 (none)!dyoung renamed a file to reflect version 2005/03/20 15:41:24-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/21 00:26:12+01:00 uni-frankfurt.de!mickeyl Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into r2d2.tm.informatik.uni-frankfurt.de:/local/pkg/oe/packages 2005/03/21 00:26:02+01:00 uni-frankfurt.de!mickeyl add libsndfile and add polypaudio. the latter in nonworking, because of a bogus 'undefined reference to pa_client_conf_from_x11' 2005/03/21 00:17:43+01:00 handhelds.org!zecke QtEmbedded iPAQ sound: -Hardcode to use stereo -Do not crash on empty sound files 2005/03/20 12:41:29-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/20 21:34:03+01:00 uni-frankfurt.de!mickeyl update qpegps 0.9.2.3 and remove 0.9.1+cvs 2005/03/20 10:41:22-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/20 18:30:33+00:00 rpsys.net!RP Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into tim.rpsys.net:/usr/oe/openembedded 2005/03/20 18:29:30+00:00 rpsys.net!RP openzaurus-2.6: Fix corrupted patch 2005/03/20 19:15:02+01:00 uni-frankfurt.de!mickeyl Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into gandalf.tm.informatik.uni-frankfurt.de:/local/pkg/oe/packages 2005/03/20 19:14:15+01:00 uni-frankfurt.de!mickeyl add meta task for all python packages compatible w/ sharprom 2005/03/20 09:41:22-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/20 17:22:01+00:00 rpsys.net!RP openzaurus-2.6: bump PR 2005/03/20 17:18:43+00:00 rpsys.net!RP Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into tim.rpsys.net:/usr/oe/openembedded 2005/03/20 17:18:21+00:00 rpsys.net!RP openzaurus-2.6: Add pxa turbo mode suspend/resume fix, final updates for multi platform w100fb, patch tweaks to keep compatible with mainline. 2005/03/20 04:19:47-10:00 (none)!dyoung Merge bk://nslu2-linux@nslu2-linux.bkbits.net/openembedded into builder.(none):/home/dereky/bbroot/openembedded 2005/03/21 01:08:40+10:30 (none)!rwhitby Merge bk://nslu2-linux@nslu2-linux.bkbits.net/openembedded into home.(none):/home/bitbake/openembedded 2005/03/21 01:08:20+10:30 (none)!rwhitby Merged unslung-standard and unslung-able into a single unslung distro. Updated to support downloadable kernel modules. 2005/03/20 04:10:03-10:00 (none)!dyoung w3cam is a lightweight application to grab images from a V4L device 2005/03/20 01:41:29-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/20 10:04:55+01:00 uni-frankfurt.de!mickeyl opie-datebook-plugins: fix APPNAME and remove errornous install. guys, we don't install binaries by hand for Opie packages. Opie.bbclass exists for a reason - read it\! 2005/03/20 19:22:11+10:30 (none)!rwhitby Merge bk://nslu2-linux@nslu2-linux.bkbits.net/openembedded into home.(none):/home/wl500g/openembedded 2005/03/19 12:41:23-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/19 20:50:29+01:00 uni-frankfurt.de!mickeyl add sets module to python-math 2005/03/19 10:41:24-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/19 19:22:37+01:00 uni-frankfurt.de!mickeyl zaurus kernels: catch up with package renaming 2005/03/19 19:16:02+01:00 uni-frankfurt.de!mickeyl bump CVSDATE for openzaurus-3.5.3 2005/03/19 19:00:53+01:00 uni-frankfurt.de!mickeyl only apply allow-no-pw patch to dropbear if DISTRO_TYPE == debug 2005/03/19 08:41:26-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/19 16:31:50+00:00 reciva.com!pb set gpe-contacts 0.36 as preferred version 2005/03/19 16:30:54+00:00 reciva.com!pb update gpe-contacts to 0.36 2005/03/19 07:41:23-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/19 16:34:57+01:00 utwente.nl!koen Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into bitbake.utwente.nl:/home/koen/OE/openembedded 2005/03/19 16:34:45+01:00 utwente.nl!koen familiar-0.8.2.conf: don't set cvsdate for now 2005/03/19 15:46:52+01:00 vanille.de!mickeyl this changeset fixes the broken keyboard autorepeat for ipaq and sl5xxx 2005/03/19 04:41:29-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/19 12:38:25+01:00 utwente.nl!koen Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into bitbake.utwente.nl:/home/koen/OE/openembedded 2005/03/19 12:38:07+01:00 utwente.nl!koen familiar-0.8.2.conf: move CVSDATE to tuesday 2005/03/19 18:19:59+10:30 (none)!rwhitby Added muxsshssl and nail 2005/03/18 14:41:35-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/19 08:49:24+10:30 (none)!rwhitby Merge bk://nslu2-linux@nslu2-linux.bkbits.net/openembedded into home.(none):/home/bitbake/openembedded 2005/03/19 08:48:48+10:30 (none)!rwhitby Fixed muxsshssl unpacking 2005/03/18 22:59:51+01:00 zeckescompany.nl!alwin added datebookplugins to build-system 2005/03/18 12:41:25-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/18 15:40:19-05:00 handhelds.org!kergoth Fix the permissions on /dev/tty and /dev/console in the /dev/ makedevs'd ramdisk. This fixes that annoying bug where | more doesnt work, and also makes the openssh ssh client stop sucking. 2005/03/18 11:41:27-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/18 14:01:26-05:00 handhelds.org!kergoth Fix ttyconv's DESCRIPTION. 2005/03/18 14:00:35-05:00 handhelds.org!kergoth Merge oe-devel@oe-devel.bkbits.net:openembedded into handhelds.org:/home/kergoth/code/openembedded 2005/03/18 14:00:11-05:00 handhelds.org!kergoth Add ttyconv 0.2.3 (A small app to convert terminal sessions from one encoding to another). 2005/03/18 19:58:03+01:00 dyndns.org!reenoo Merge oe-devel@oe-devel.bkbits.net:openembedded into sugarcube.dyndns.org:/home2/oe/bakery/openembedded 2005/03/18 19:55:40+01:00 dyndns.org!reenoo kaffe: resurrect kaffe from nonworking. the packaging still needs some polishing. the -qt incarnation needs to be tested and the (qt only) stuff from nonworking removed if it works. 2005/03/18 10:42:21-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/18 13:04:34-05:00 handhelds.org!kergoth Add 'patch' to the RDEPENDS of bazaar. It works now, if you install GNU's tar instead of busybox's. 2005/03/18 09:42:15-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/18 12:19:48-05:00 handhelds.org!kergoth Merge oe-devel@oe-devel.bkbits.net:openembedded into handhelds.org:/home/kergoth/code/openembedded 2005/03/18 12:19:12-05:00 handhelds.org!kergoth Add ccache.inc, which: Makes ccache use a TMPDIR specific ccache directory if using the crosscompiler, since it isn't likely to be useful with any other toolchain than the one we just built, and would otherwise push more useful things out of the default cache. 2005/03/18 08:41:34-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/18 17:19:59+01:00 local!hrw Merge bk://oe-devel@oe-devel.bkbits.net/openembedded/ into marcinj.local:/home/hrw/zaurus/bb/openembedded 2005/03/18 10:34:22-05:00 handhelds.org!kergoth Make the bazaar .bb install its bazaar-gpg-check awk script, and RSUGGESTS gnupg. 2005/03/18 10:16:16-05:00 handhelds.org!kergoth neon: fix LICENSE. Bump PR. Pass --enable-shared --enable-static. Add a do_stage. 2005/03/18 10:10:45-05:00 handhelds.org!kergoth Merge oe-devel@oe-devel.bkbits.net:openembedded into handhelds.org:/home/kergoth/code/openembedded 2005/03/18 10:10:26-05:00 handhelds.org!kergoth Add bazaar 1.2 (an implementation of GNU Arch in C, based on tla). 2005/03/18 06:41:26-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/18 15:07:27+01:00 local!hrw Merge bk://oe-devel@oe-devel.bkbits.net/openembedded/ into marcinj.local:/home/hrw/zaurus/bb/openembedded 2005/03/18 15:07:05+01:00 local!hrw added more fonts to meta-opie 2005/03/18 13:43:33+00:00 rpsys.net!RP openzaurus-2.6: Dirks updates to Tosa and some w100fb updates 2005/03/18 04:41:25-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/18 22:57:59+10:30 (none)!rwhitby Merge bk://nslu2-linux@nslu2-linux.bkbits.net/openembedded into home.(none):/home/bitbake/openembedded 2005/03/18 22:57:42+10:30 (none)!rwhitby Added muxsshssl, but still waiting for sf.net CVS to update before it can be used. 2005/03/18 13:23:12+01:00 uni-frankfurt.de!mickeyl ship opie-qss in the default image 2005/03/18 03:41:21-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/18 12:25:50+01:00 local!hrw added development version 2.0.17 of kdepimpi (marked as non-default) 2005/03/18 21:55:18+10:30 (none)!rwhitby Added mt-daapd, strace and nail to openslug-packages. 2005/03/18 01:04:24-10:00 (none)!dyoung A enhanced mailx replacement 2005/03/18 00:46:33-10:00 (none)!dyoung mt-daapd_0.2.1.1.bb: changed the dl location 2005/03/18 20:59:08+10:30 (none)!rwhitby Merge bk://nslu2-linux@nslu2-linux.bkbits.net/openembedded into home.(none):/home/bitbake/openembedded 2005/03/18 20:58:31+10:30 (none)!rwhitby Added sudo and perl to openslug-packages, and demoted mt-daapd 2005/03/17 19:41:54-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/17 22:30:43-05:00 handhelds.org!kergoth Kill a few files that were unintentionally checked in, in the last cset. 2005/03/17 22:26:35-05:00 handhelds.org!kergoth Merge oe-devel@oe-devel.bkbits.net:openembedded into handhelds.org:/home/kergoth/code/openembedded 2005/03/17 22:26:19-05:00 handhelds.org!kergoth Start adding wrt54g{,s} bits. This is the linux-wrt 2.4.20 kernel, and an /etc/network/interfaces file. 2005/03/17 16:42:09-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/18 00:45:28+01:00 handhelds.org!zecke Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into handhelds.org:/home/ich/programming/oe/openembedded 2005/03/18 00:44:27+01:00 handhelds.org!zecke ZeeCookBook patch by Philip Frampton: -Update Zeecookbook to 1.1 from 1.0beta3 -Fix packaging 2005/03/17 15:41:32-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/17 18:37:37-05:00 handhelds.org!kergoth Merge oe-devel@oe-devel.bkbits.net:openembedded into handhelds.org:/home/kergoth/code/openembedded 2005/03/17 18:37:17-05:00 handhelds.org!kergoth Add pcmciautils 001 (can use these to manage 16 bit pcmcia cards with hotplug, given a recent enough kernel and sysfsutils). 2005/03/17 18:35:58-05:00 handhelds.org!kergoth Apply libsysfs write attributes patch to sysfsutils (required for pcmciautils). 2005/03/18 00:06:08+01:00 utwente.nl!koen meta-sectest-gpe.bb: disable btscanner and dillo for now 2005/03/17 14:41:19-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/17 23:37:28+01:00 utwente.nl!koen Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into bitbake.utwente.nl:/home/koen/OE/openembedded 2005/03/17 23:37:14+01:00 utwente.nl!koen mbmerlin_0.8.1-2.bb: unbork mbmerlin 2005/03/17 22:43:32+01:00 handhelds.org!zecke Pocket Cellar patches courtsey Philip Frampton: -Patches are not yet 100% Qtopia/Opie conform but still it is an improvement -Lookup the PocketCellar Wine Database at the right directory 2005/03/17 21:03:50+01:00 dyndns.org!reenoo vlc-gpe: remove unnecessary "/" separator one more time. 2005/03/17 06:41:26-08:00 bkbits.net!nslu2-linux.adm Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/17 14:56:19+01:00 utwente.nl!koen preferred-gpe-versions.inc: newer xextensions 2005/03/16 09:40:06+10:30 (none)!rwhitby Patch for ipkg which makes it respect the setting of sysconfdir. 2005/03/16 09:39:14+10:30 (none)!rwhitby Added wl500g machine and AsusOE distro 2005/03/16 08:08:59+10:30 (none)!rwhitby Merge bk://oe-devel.bkbits.net/openembedded into home.(none):/home/wl500g/openembedded 2005/03/11 22:36:27+10:30 (none)!rwhitby Merge bk://oe-devel.bkbits.net/openembedded into home.(none):/home/wl500g/openembedded BKrev: 423ee345bbZEjSmlBpykWs0rnfomxA --- packages/qte/qte-2.3.10/ipaq_sound_fix.patch | 0 packages/qte/qte-2.3.10/key.patch | 79 + packages/qte/qte-2.3.10/ramses-keyboard.patch | 2339 ---------------------- packages/qte/qte-2.3.10/ramses/qkeyboard_qws.cpp | 0 packages/qte/qte-2.3.10/ramses/qkeyboard_qws.h | 0 packages/qte/qte_2.3.10.bb | 17 +- 6 files changed, 91 insertions(+), 2344 deletions(-) create mode 100644 packages/qte/qte-2.3.10/ipaq_sound_fix.patch delete mode 100644 packages/qte/qte-2.3.10/ramses-keyboard.patch create mode 100644 packages/qte/qte-2.3.10/ramses/qkeyboard_qws.cpp create mode 100644 packages/qte/qte-2.3.10/ramses/qkeyboard_qws.h (limited to 'packages/qte') diff --git a/packages/qte/qte-2.3.10/ipaq_sound_fix.patch b/packages/qte/qte-2.3.10/ipaq_sound_fix.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/qte/qte-2.3.10/key.patch b/packages/qte/qte-2.3.10/key.patch index e69de29bb2..c89f893517 100644 --- a/packages/qte/qte-2.3.10/key.patch +++ b/packages/qte/qte-2.3.10/key.patch @@ -0,0 +1,79 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- qt-2.3.10/src/kernel/qkeyboard_qws.cpp~key 2005-03-19 15:44:15.120219000 +0100 ++++ qt-2.3.10/src/kernel/qkeyboard_qws.cpp 2005-03-19 15:43:43.247892000 +0100 +@@ -848,6 +848,9 @@ + bool release = false; + int keypad = 0; + ++#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) // need autorepeat implemented here? ++ bool repeatable = TRUE; ++ + #ifndef QT_QWS_USE_KEYCODES + #if defined(QT_QWS_IPAQ) + // map ipaq 'action' key (0x60, 0xe0) +@@ -984,9 +987,6 @@ + if ( currentKey ) + keyCode = currentKey->key_code; + +-#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) // need autorepeat implemented here? +- bool repeatable = TRUE; +- + #if defined(QT_QWS_IPAQ) + switch (code) { + #if defined(QT_QWS_SL5XXX) +@@ -1061,18 +1061,14 @@ + repeatable = FALSE; + #endif + ++#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) + if ( qt_screen->isTransformed() + && keyCode >= Qt::Key_Left && keyCode <= Qt::Key_Down ) + { + keyCode = xform_dirkey(keyCode); + } +- +-#ifdef QT_QWS_AUTOREPEAT_MANUALLY +- if ( repeatable && !release ) +- rep->start(prevuni,prevkey,modifiers); +- else +- rep->stop(); + #endif ++ + #endif + /* + Translate shift+Key_Tab to Key_Backtab +@@ -1234,6 +1230,14 @@ + } else { + prevkey = prevuni = 0; + } ++ ++#ifdef QT_QWS_AUTOREPEAT_MANUALLY ++ if ( repeatable && !release ) ++ rep->start(prevuni,prevkey,modifiers); ++ else ++ rep->stop(); ++#endif ++ + } + #ifndef QT_QWS_USE_KEYCODES + extended = 0; +@@ -2056,6 +2060,7 @@ + press ? "press" : "release", + repeatable ? "true":"false" ); + ++#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) + if ( qt_screen->isTransformed() && k >= Qt::Key_Left && k <= Qt::Key_Down ) + { + qDebug( "SimpadButtonsHandler() - We are transformed! Correcting..." ); +@@ -2063,6 +2068,7 @@ + k = xform_dirkey( k ); + qDebug( "SimpadButtonsHandler() - Old Key: %d - New Key %d", oldK, k ); + } ++#endif + + if ( repeatable && press ) + repeater->start( repeatdelay, true ); diff --git a/packages/qte/qte-2.3.10/ramses-keyboard.patch b/packages/qte/qte-2.3.10/ramses-keyboard.patch deleted file mode 100644 index 61b5f302cf..0000000000 --- a/packages/qte/qte-2.3.10/ramses-keyboard.patch +++ /dev/null @@ -1,2339 +0,0 @@ - -# -# Patch managed by http://www.holgerschurig.de/patcher.html -# - ---- qt-2.3.10/src/kernel/qkeyboard_qws.cpp~ramses-keyboard -+++ qt-2.3.10/src/kernel/qkeyboard_qws.cpp -@@ -1,5 +1,5 @@ - /**************************************************************************** --** $Id$ -+** $Id$ - ** - ** Implementation of Qt/Embedded keyboard drivers - ** -@@ -37,7 +37,6 @@ - #include - #include - #include --#include - #include - - #include -@@ -45,9 +44,7 @@ - #include - - #include --#ifdef _OS_LINUX_ - #include --#endif - #include - #include - #include -@@ -55,121 +52,13 @@ - #include - #include - --#ifdef QT_QWS_TIP2 --#include --#endif -- --//#define QT_QWS_USE_KEYCODES -- - #ifndef QT_NO_QWS_KEYBOARD - --#ifdef QT_QWS_YOPY --#include --#include --#include --#include --extern "C" { -- int getpgid(int); --} --#endif -- --#if !defined(_OS_QNX6_) -- - #include --#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) - #include - #include --#endif -- --/* -- * SIMpad switches handler -- * (C) 2003-2005 Michael 'Mickey' Lauer -- */ -- -- -- --#include --#define SIMPAD_SWITCHES_DEVICE "/dev/misc/switches" -- --// switches from left top to right down over the SIMpad surface -- --#define SIMPAD_SWITCH_POWER 0x02 --#define SIMPAD_SWITCH_UPPER 0x10 --#define SIMPAD_SWITCH_UP 0x20 --#define SIMPAD_SWITCH_DOWN 0x40 --#define SIMPAD_SWITCH_LEFT 0x80 --#define SIMPAD_SWITCH_RIGHT 0x100 --#define SIMPAD_SWITCH_LOWER 0x8 -- --class QWSsimpadButtonsHandler : public QWSKeyboardHandler --{ -- Q_OBJECT -- -- public: -- QWSsimpadButtonsHandler(); -- virtual ~QWSsimpadButtonsHandler(); -- -- bool isOpen() { return fd > 0; } -- -- private slots: -- void readSwitchesData(); -- void autoRepeat(); -- -- private: -- switches_mask_t switches; -- -- int fd; -- int repeatdelay; -- int repeatperiod; -- -- int lastCode; // last native code -- int lastPress; // last press/release state -- -- int k; // last emitted Qt key code -- int shiftKeyPressed; // true if one of the SHIFT keys has been pressed and not yet released -- bool shiftUsed; // true if SHIFT has been used -- -- QTime eventTimer; // tracks time between raw events -- QTimer* repeater; -- QSocketNotifier *notifier; --}; -- -- --#ifdef QT_QWS_SL5XXX --#include --#endif -- --#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) --#define QT_QWS_AUTOREPEAT_MANUALLY --#endif -- -- -- --#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) --static int dir_keyrot = -1; -- --static int xform_dirkey(int key) --{ -- if (dir_keyrot < 0) { -- // get the rotation -- char *kerot = getenv("QWS_CURSOR_ROTATION"); -- if (kerot) { -- if (strcmp(kerot, "90") == 0) -- dir_keyrot = 1; -- else if (strcmp(kerot, "180") == 0) -- dir_keyrot = 2; -- else if (strcmp(kerot, "270") == 0) -- dir_keyrot = 3; -- else -- dir_keyrot = 0; -- } else { -- dir_keyrot = 0; -- } -- } -- int xf = qt_screen->transformOrientation() + dir_keyrot; -- return (key-Qt::Key_Left+xf)%4+Qt::Key_Left; --} --#endif -+#include -+#include - - #define VTSWITCHSIG SIGUSR2 - -@@ -177,374 +66,6 @@ - static int vtQws = 0; - static int kbdFD = -1; - --class QWSyopyButtonsHandler : public QWSKeyboardHandler --{ -- Q_OBJECT --public: -- QWSyopyButtonsHandler(); -- virtual ~QWSyopyButtonsHandler(); -- -- bool isOpen() { return buttonFD > 0; } -- --private slots: -- void readKeyboardData(); -- --private: -- QString terminalName; -- int buttonFD; -- struct termios newT, oldT; -- QSocketNotifier *notifier; --}; -- --#endif // QNX6 -- -- --class QWSKeyboardRepeater : public QObject { -- Q_OBJECT --public: -- static QWSKeyboardRepeater *current; -- -- QWSKeyboardRepeater(QWSKeyboardHandler* parent) : -- QObject(parent) -- { -- current = this; -- repeatdelay = 400; -- repeatperiod = 80; -- repeater = new QTimer(this); -- connect(repeater, SIGNAL(timeout()), this, SLOT(autoRepeat())); -- } -- -- ~QWSKeyboardRepeater() -- { -- if ( current == this ) -- current = 0; -- } -- -- void setAutoRepeat(int d, int p) { if ( d > 0 ) repeatdelay=d; -- if ( p > 0 ) repeatperiod=p;} -- void getAutoRepeat(int *d ,int *p ) { if (d) *d=repeatdelay; -- if (p) *p=repeatperiod; } -- -- void stop() -- { -- repeater->stop(); -- } -- -- void start(int uni, int key, int mod) -- { -- runi = uni; -- rkey = key; -- rmod = mod; -- repeater->start(repeatdelay,TRUE); -- } -- --private slots: -- void autoRepeat(); -- --private: -- int runi; -- int rkey; -- int rmod; -- -- QTimer* repeater; -- int repeatdelay, repeatperiod; --}; -- --QWSKeyboardRepeater *QWSKeyboardRepeater::current=0; -- --void QWSKeyboardRepeater::autoRepeat() --{ --#ifdef QT_QWS_AUTOREPEAT_MANUALLY -- qwsServer->processKeyEvent( runi, rkey, rmod, FALSE, TRUE ); -- qwsServer->processKeyEvent( runi, rkey, rmod, TRUE, TRUE ); -- repeater->start(repeatperiod); --#endif --} -- -- --#ifdef QT_QWS_SL5XXX --static const QWSServer::KeyMap keyM[] = { -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 00 -- { Qt::Key_A, 'a' , 'A' , 'A'-64 }, // 01 -- { Qt::Key_B, 'b' , 'B' , 'B'-64 }, // 02 -- { Qt::Key_C, 'c' , 'C' , 'C'-64 }, // 03 -- { Qt::Key_D, 'd' , 'D' , 'D'-64 }, // 04 -- { Qt::Key_E, 'e' , 'E' , 'E'-64 }, // 05 -- { Qt::Key_F, 'f' , 'F' , 'F'-64 }, // 06 -- { Qt::Key_G, 'g' , 'G' , 'G'-64 }, // 07 -- { Qt::Key_H, 'h' , 'H' , 'H'-64 }, // 08 -- { Qt::Key_I, 'i' , 'I' , 'I'-64 }, // 09 -- { Qt::Key_J, 'j' , 'J' , 'J'-64 }, // 0a 10 -- { Qt::Key_K, 'k' , 'K' , 'K'-64 }, // 0b -- { Qt::Key_L, 'l' , 'L' , 'L'-64 }, // 0c -- { Qt::Key_M, 'm' , 'M' , 'M'-64 }, // 0d -- { Qt::Key_N, 'n' , 'N' , 'N'-64 }, // 0e -- { Qt::Key_O, 'o' , 'O' , 'O'-64 }, // 0f -- { Qt::Key_P, 'p' , 'P' , 'P'-64 }, // 10 -- { Qt::Key_Q, 'q' , 'Q' , 'Q'-64 }, // 11 -- { Qt::Key_R, 'r' , 'R' , 'R'-64 }, // 12 -- { Qt::Key_S, 's' , 'S' , 'S'-64 }, // 13 -- { Qt::Key_T, 't' , 'T' , 'T'-64 }, // 14 20 -- { Qt::Key_U, 'u' , 'U' , 'U'-64 }, // 15 -- { Qt::Key_V, 'v' , 'V' , 'V'-64 }, // 16 -- { Qt::Key_W, 'w' , 'W' , 'W'-64 }, // 17 -- { Qt::Key_X, 'x' , 'X' , 'X'-64 }, // 18 -- { Qt::Key_Y, 'y' , 'Y' , 'Y'-64 }, // 19 -- { Qt::Key_Z, 'z' , 'Z' , 'Z'-64 }, // 1a -- { Qt::Key_Shift, 0xffff , 0xffff , 0xffff }, // 1b -- { Qt::Key_Return, 13 , 13 , 0xffff }, // 1c -- { Qt::Key_F11, 0xffff , 0xffff , 0xffff }, // 1d todo -- { Qt::Key_F22, 0xffff , 0xffff , 0xffff }, // 1e 30 -- { Qt::Key_Backspace, 8 , 8 , 0xffff }, // 1f -- { Qt::Key_F31, 0xffff , 0xffff , 0xffff }, // 20 -- { Qt::Key_F35, 0xffff , 0xffff , 0xffff }, // 21 light -- { Qt::Key_Escape, 0xffff , 0xffff , 0xffff }, // 22 -- -- // Direction key code are for *UNROTATED* display. -- { Qt::Key_Up, 0xffff , 0xffff , 0xffff }, // 23 -- { Qt::Key_Right, 0xffff , 0xffff , 0xffff }, // 24 -- { Qt::Key_Left, 0xffff , 0xffff , 0xffff }, // 25 -- { Qt::Key_Down, 0xffff , 0xffff , 0xffff }, // 26 -- -- { Qt::Key_F33, 0xffff , 0xffff , 0xffff }, // 27 OK -- { Qt::Key_F12, 0xffff , 0xffff , 0xffff }, // 28 40 home -- { Qt::Key_1, '1' , 'q' , 'Q'-64 }, // 29 -- { Qt::Key_2, '2' , 'w' , 'W'-64 }, // 2a -- { Qt::Key_3, '3' , 'e' , 'E'-64 }, // 2b -- { Qt::Key_4, '4' , 'r' , 'R'-64 }, // 2c -- { Qt::Key_5, '5' , 't' , 'T'-64 }, // 2d -- { Qt::Key_6, '6' , 'y' , 'Y'-64 }, // 2e -- { Qt::Key_7, '7' , 'u' , 'U'-64 }, // 2f -- { Qt::Key_8, '8' , 'i' , 'I'-64 }, // 30 -- { Qt::Key_9, '9' , 'o' , 'O'-64 }, // 31 -- { Qt::Key_0, '0' , 'p' , 'P'-64 }, // 32 50 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 33 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 34 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 35 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 36 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 37 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 38 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 39 -- { Qt::Key_Minus, '-' , 'b' , 'B'-64 }, // 3a -- { Qt::Key_Plus, '+' , 'n' , 'N'-64 }, // 3b -- { Qt::Key_CapsLock, 0xffff , 0xffff , 0xffff }, // 3c 60 -- { Qt::Key_At, '@' , 's' , 'S'-64 }, // 3d -- { Qt::Key_Question, '?' , '?' , 0xffff }, // 3e -- { Qt::Key_Comma, ',' , ',' , 0xffff }, // 3f -- { Qt::Key_Period, '.' , '.' , 0xffff }, // 40 -- { Qt::Key_Tab, 9 , '\\' , 0xffff }, // 41 -- { Qt::Key_X, 0xffff , 'x' , 'X'-64 }, // 42 -- { Qt::Key_C, 0xffff , 'c' , 'C'-64 }, // 43 -- { Qt::Key_V, 0xffff , 'v' , 'V'-64 }, // 44 -- { Qt::Key_Slash, '/' , '/' , 0xffff }, // 45 -- { Qt::Key_Apostrophe, '\'' , '\'' , 0xffff }, // 46 70 -- { Qt::Key_Semicolon, ';' , ';' , 0xffff }, // 47 -- { Qt::Key_QuoteDbl, '\"' , '\"' , 0xffff }, // 48 -- { Qt::Key_Colon, ':' , ':' , 0xffff }, // 49 -- { Qt::Key_NumberSign, '#' , 'd' , 'D'-64 }, // 4a -- { Qt::Key_Dollar, '$' , 'f' , 'F'-64 }, // 4b -- { Qt::Key_Percent, '%' , 'g' , 'G'-64 }, // 4c -- { Qt::Key_Underscore, '_' , 'h' , 'H'-64 }, // 4d -- { Qt::Key_Ampersand, '&' , 'j' , 'J'-64 }, // 4e -- { Qt::Key_Asterisk, '*' , 'k' , 'K'-64 }, // 4f -- { Qt::Key_ParenLeft, '(' , 'l' , 'L'-64 }, // 50 80 -- { Qt::Key_Delete, '[' , '[' , '[' }, // 51 -- { Qt::Key_Z, 0xffff , 'z' , 'Z'-64 }, // 52 -- { Qt::Key_Equal, '=' , 'm' , 'M'-64 }, // 53 -- { Qt::Key_ParenRight, ')' , ']' , ']' }, // 54 -- { Qt::Key_AsciiTilde, '~' , '^' , '^' }, // 55 -- { Qt::Key_Less, '<' , '{' , '{' }, // 56 -- { Qt::Key_Greater, '>' , '}' , '}' }, // 57 -- { Qt::Key_F9, 0xffff , 0xffff , 0xffff }, // 58 datebook -- { Qt::Key_F10, 0xffff , 0xffff , 0xffff }, // 59 address -- { Qt::Key_F13, 0xffff , 0xffff , 0xffff }, // 5a 90 email -- { Qt::Key_F30, ' ' , ' ' , 0xffff }, // 5b select -- { Qt::Key_Space, ' ' , '|' , '`' }, // 5c -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 5d -- { Qt::Key_Exclam, '!' , 'a' , 'A'-64 }, // 5e -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 5f -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 60 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 61 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 62 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 63 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 64 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 65 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 66 -- { Qt::Key_Meta, 0xffff , 0xffff , 0xffff }, // 67 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 68 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 69 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 6a -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 6b -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 6c -- { Qt::Key_F34, 0xffff , 0xffff , 0xffff }, // 6d power -- { Qt::Key_F13, 0xffff , 0xffff , 0xffff }, // 6e mail long -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 6f -- { Qt::Key_NumLock, 0xffff , 0xffff , 0xffff }, // 70 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 71 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 72 -- { 0x20ac, 0xffff , 0x20ac , 0x20ac }, // 73 Euro sign -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 74 -- { Qt::Key_F32, 0xffff , 0xffff , 0xffff }, // 75 Sync -- { 0, 0xffff , 0xffff , 0xffff } --}; --#else --// Standard PC101 --static const QWSServer::KeyMap keyM[] = { -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Escape, 27 , 27 , 0xffff }, -- { Qt::Key_1, '1' , '!' , 0xffff }, -- { Qt::Key_2, '2' , '@' , 0xffff }, -- { Qt::Key_3, '3' , '#' , 0xffff }, -- { Qt::Key_4, '4' , '$' , 0xffff }, -- { Qt::Key_5, '5' , '%' , 0xffff }, -- { Qt::Key_6, '6' , '^' , 0xffff }, -- { Qt::Key_7, '7' , '&' , 0xffff }, -- { Qt::Key_8, '8' , '*' , 0xffff }, -- { Qt::Key_9, '9' , '(' , 0xffff }, // 10 -- { Qt::Key_0, '0' , ')' , 0xffff }, -- { Qt::Key_Minus, '-' , '_' , 0xffff }, -- { Qt::Key_Equal, '=' , '+' , 0xffff }, -- { Qt::Key_Backspace, 8 , 8 , 0xffff }, -- { Qt::Key_Tab, 9 , 9 , 0xffff }, -- { Qt::Key_Q, 'q' , 'Q' , 'Q'-64 }, -- { Qt::Key_W, 'w' , 'W' , 'W'-64 }, -- { Qt::Key_E, 'e' , 'E' , 'E'-64 }, -- { Qt::Key_R, 'r' , 'R' , 'R'-64 }, -- { Qt::Key_T, 't' , 'T' , 'T'-64 }, // 20 -- { Qt::Key_Y, 'y' , 'Y' , 'Y'-64 }, -- { Qt::Key_U, 'u' , 'U' , 'U'-64 }, -- { Qt::Key_I, 'i' , 'I' , 'I'-64 }, -- { Qt::Key_O, 'o' , 'O' , 'O'-64 }, -- { Qt::Key_P, 'p' , 'P' , 'P'-64 }, -- { Qt::Key_BraceLeft, '[' , '{' , 0xffff }, -- { Qt::Key_BraceRight, ']' , '}' , 0xffff }, -- { Qt::Key_Return, 13 , 13 , 0xffff }, -- { Qt::Key_Control, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_A, 'a' , 'A' , 'A'-64 }, // 30 -- { Qt::Key_S, 's' , 'S' , 'S'-64 }, -- { Qt::Key_D, 'd' , 'D' , 'D'-64 }, -- { Qt::Key_F, 'f' , 'F' , 'F'-64 }, -- { Qt::Key_G, 'g' , 'G' , 'G'-64 }, -- { Qt::Key_H, 'h' , 'H' , 'H'-64 }, -- { Qt::Key_J, 'j' , 'J' , 'J'-64 }, -- { Qt::Key_K, 'k' , 'K' , 'K'-64 }, -- { Qt::Key_L, 'l' , 'L' , 'L'-64 }, -- { Qt::Key_Semicolon, ';' , ':' , 0xffff }, -- { Qt::Key_Apostrophe, '\'' , '"' , 0xffff }, // 40 -- { Qt::Key_QuoteLeft, '`' , '~' , 0xffff }, -- { Qt::Key_Shift, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Backslash, '\\' , '|' , 0xffff }, -- { Qt::Key_Z, 'z' , 'Z' , 'Z'-64 }, -- { Qt::Key_X, 'x' , 'X' , 'X'-64 }, -- { Qt::Key_C, 'c' , 'C' , 'C'-64 }, -- { Qt::Key_V, 'v' , 'V' , 'V'-64 }, -- { Qt::Key_B, 'b' , 'B' , 'B'-64 }, -- { Qt::Key_N, 'n' , 'N' , 'N'-64 }, -- { Qt::Key_M, 'm' , 'M' , 'M'-64 }, // 50 -- { Qt::Key_Comma, ',' , '<' , 0xffff }, -- { Qt::Key_Period, '.' , '>' , 0xffff }, -- { Qt::Key_Slash, '/' , '?' , 0xffff }, -- { Qt::Key_Shift, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Asterisk, '*' , '*' , 0xffff }, -- { Qt::Key_Alt, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Space, ' ' , ' ' , 0xffff }, -- { Qt::Key_CapsLock, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_F1, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_F2, 0xffff , 0xffff , 0xffff }, // 60 -- { Qt::Key_F3, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_F4, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_F5, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_F6, 0xffff , 0xffff , 0xffff }, --#if defined(QT_KEYPAD_MODE) -- { Qt::Key_Menu, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Back, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Yes, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_No, 0xffff , 0xffff , 0xffff }, --#else -- { Qt::Key_F7, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_F8, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_F9, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_F10, 0xffff , 0xffff , 0xffff }, --#endif -- { Qt::Key_NumLock, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_ScrollLock, 0xffff , 0xffff , 0xffff }, // 70 -- { Qt::Key_7, '7' , '7' , 0xffff }, -- { Qt::Key_8, '8' , '8' , 0xffff }, -- { Qt::Key_9, '9' , '9' , 0xffff }, -- { Qt::Key_Minus, '-' , '-' , 0xffff }, -- { Qt::Key_4, '4' , '4' , 0xffff }, -- { Qt::Key_5, '5' , '5' , 0xffff }, -- { Qt::Key_6, '6' , '6' , 0xffff }, -- { Qt::Key_Plus, '+' , '+' , 0xffff }, -- { Qt::Key_1, '1' , '1' , 0xffff }, -- { Qt::Key_2, '2' , '2' , 0xffff }, // 80 -- { Qt::Key_3, '3' , '3' , 0xffff }, -- { Qt::Key_0, '0' , '0' , 0xffff }, -- { Qt::Key_Period, '.' , '.' , 0xffff }, -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Less, '<' , '>' , 0xffff }, --#if defined(QT_KEYPAD_MODE) -- { Qt::Key_Call, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Hangup, 0xffff , 0xffff , 0xffff }, --#else -- { Qt::Key_F11, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_F12, 0xffff , 0xffff , 0xffff }, --#endif -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // 90 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Enter, 13 , 13 , 0xffff }, -- { Qt::Key_Control, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Slash, '/' , '/' , 0xffff }, -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Meta, 0xffff , 0xffff , 0xffff }, // 100 -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // break -- { Qt::Key_Home, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Up, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Prior, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Left, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Right, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_End, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Down, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Next, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Insert, 0xffff , 0xffff , 0xffff }, // 110 -- { Qt::Key_Delete, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // macro -- { Qt::Key_F13, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_F14, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Help, 0xffff , 0xffff , 0xffff }, --#if defined(QT_KEYPAD_MODE) -- { Qt::Key_Select, 0xffff , 0xffff , 0xffff }, // do --#else -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, // do --#endif -- { Qt::Key_F17, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Plus, '+' , '-' , 0xffff }, -- { Qt::Key_Pause, 0xffff , 0xffff , 0xffff }, // 120 -- { Qt::Key_F31, 0xffff , 0xffff , 0xffff }, // IM toggle -- { Qt::Key_F32, 0xffff , 0xffff , 0xffff }, // Sync -- { Qt::Key_F34, 0xffff , 0xffff , 0xffff }, // Power -- { Qt::Key_F35, 0xffff , 0xffff , 0xffff }, // Backlight --#if defined(QT_KEYPAD_MODE) -- { Qt::Key_Context1, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Context2, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Context3, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_Context4, 0xffff , 0xffff , 0xffff }, --#else -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, -- { Qt::Key_unknown, 0xffff , 0xffff , 0xffff }, --#endif -- { 0, 0xffff , 0xffff , 0xffff } --}; --#endif --static const int keyMSize = sizeof(keyM)/sizeof(QWSServer::KeyMap)-1; - static QIntDict *overrideMap = 0; - - /*! -@@ -562,8 +83,6 @@ - overrideMap = map; - } - --#if !defined(_OS_QNX6_) -- - /*! - \class QWSKeyboardHandler qkeyboard_qws.h - \brief Keyboard driver/handler for Qt/Embedded -@@ -597,114 +116,28 @@ - qwsServer->processKeyEvent( unicode, keycode, modifiers, isPress, autoRepeat ); - } - --class QWSPC101KeyboardHandler : public QWSKeyboardHandler --{ -- Q_OBJECT --public: -- QWSPC101KeyboardHandler(); -- virtual ~QWSPC101KeyboardHandler(); -- -- void doKey(uchar scancode); -- -- -- void restoreLeds(); - --private: -- bool shift; -- bool alt; -- bool ctrl; --#if defined(QT_QWS_SL5XXX) -- bool meta; -- bool fn; -- bool numLock; --#endif -- bool caps; --#if defined(QT_QWS_IPAQ) -- uint ipaq_return_pressed:1; --#endif --#ifndef QT_QWS_USE_KEYCODES -- int extended; --#endif -- int modifiers; -- int prevuni; -- int prevkey; -- --#ifdef QT_QWS_AUTOREPEAT_MANUALLY -- QWSKeyboardRepeater *rep; --#endif --}; -- --void QWSPC101KeyboardHandler::restoreLeds() -+bool qwsSetKeyboardAutoRepeat( int /* delay */ , int /* period */ ) - { -- char leds; -- ioctl(0, KDGETLED, &leds); -- leds = leds & ~LED_CAP; -- if ( caps ) leds |= LED_CAP; -- ioctl(0, KDSETLED, leds); -+ return FALSE; - } - --class QWSTtyKeyboardHandler : public QWSPC101KeyboardHandler --{ -- Q_OBJECT --public: -- QWSTtyKeyboardHandler(const QString&); -- virtual ~QWSTtyKeyboardHandler(); -- --private slots: -- void readKeyboardData(); -- --private: -- struct termios origTermData; --}; -- -- --// can't ifdef this out because moc runs on this file --class QWSSamsungKeypadHandler : public QWSPC101KeyboardHandler -+bool qwsGetKeyboardAutoRepeat( int /* delay */ , int /* period */ ) - { -- Q_OBJECT --public: -- QWSSamsungKeypadHandler(const QString&); -- virtual ~QWSSamsungKeypadHandler(); -- --private slots: -- void readKeyboardData(); --}; -+ return FALSE; -+} - --class QWSUsbKeyboardHandler : public QWSPC101KeyboardHandler -+void qwsRestoreKeyboardLeds() - { -- Q_OBJECT --public: -- QWSUsbKeyboardHandler(const QString& device); -- virtual ~QWSUsbKeyboardHandler(); -+} - --private slots: -- void readKeyboardData(); - --private: -- int fd; -- QWSServer::KeyMap *lastPress; --}; - --class QWSVr41xxButtonsHandler : public QWSKeyboardHandler --{ -- Q_OBJECT --public: -- QWSVr41xxButtonsHandler(); -- virtual ~QWSVr41xxButtonsHandler(); - -- bool isOpen() { return buttonFD > 0; } -- --private slots: -- void readKeyboardData(); - --private: -- QString terminalName; -- int buttonFD; -- int kbdIdx; -- int kbdBufferLen; -- unsigned char *kbdBuffer; -- QSocketNotifier *notifier; --}; -+/* -+ * Virtual framebuffer keyboard driver -+ */ - - class QWSVFbKeyboardHandler : public QWSKeyboardHandler - { -@@ -727,1097 +160,393 @@ - QSocketNotifier *notifier; - }; - -- --static void vtSwitchHandler(int /*sig*/) --{ --#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) -- if (vtActive) { -- qwsServer->enablePainting(false); -- qt_screen->save(); -- if (ioctl(kbdFD, VT_RELDISP, 1) == 0) { -- vtActive = false; -- qwsServer->closeMouse(); -- } -- else { -- qwsServer->enablePainting(true); -- } -- usleep(200000); -- } -- else { -- if (ioctl(kbdFD, VT_RELDISP, VT_ACKACQ) == 0) { -- qwsServer->enablePainting(true); -- vtActive = true; -- qt_screen->restore(); -- qwsServer->openMouse(); -- qwsServer->refresh(); -- } -- } -- signal(VTSWITCHSIG, vtSwitchHandler); --#endif --} -- --// --// PC-101 type keyboards --// -- -- -- --static QWSPC101KeyboardHandler *currentPC101=0; -- --bool qwsSetKeyboardAutoRepeat( int delay, int period ) --{ --#ifdef QT_QWS_AUTOREPEAT_MANUALLY -- if ( QWSKeyboardRepeater::current ) -- QWSKeyboardRepeater::current->setAutoRepeat( delay, period ); -- return QWSKeyboardRepeater::current != 0; --#else -- Q_UNUSED(delay); -- Q_UNUSED(period); -- return FALSE; --#endif --} -- --bool qwsGetKeyboardAutoRepeat( int *delay, int *period ) --{ --#ifdef QT_QWS_AUTOREPEAT_MANUALLY -- if ( QWSKeyboardRepeater::current ) -- QWSKeyboardRepeater::current->getAutoRepeat( delay, period ); -- return QWSKeyboardRepeater::current != 0; --#else -- Q_UNUSED(delay); -- Q_UNUSED(period); -- return FALSE; -+#ifndef QT_NO_QWS_VFB -+#include "qvfbhdr.h" -+extern int qws_display_id; - #endif --} - --void qwsRestoreKeyboardLeds() -+QWSVFbKeyboardHandler::QWSVFbKeyboardHandler() - { -- if ( currentPC101 ) -- currentPC101->restoreLeds(); --} -- -+ kbdFD = -1; -+#ifndef QT_NO_QWS_VFB -+ kbdIdx = 0; -+ kbdBufferLen = sizeof( QVFbKeyData ) * 5; -+ kbdBuffer = new unsigned char [kbdBufferLen]; - -+ terminalName = QString(QT_VFB_KEYBOARD_PIPE).arg(qws_display_id); - --QWSPC101KeyboardHandler::QWSPC101KeyboardHandler() --{ -- shift = false; -- alt = false; -- ctrl = false; --#ifndef QT_QWS_USE_KEYCODES -- extended = 0; --#endif -- prevuni = 0; -- prevkey = 0; -- caps = FALSE; --#if defined(QT_QWS_SL5XXX) -- meta = FALSE; -- fn = FALSE; -+ if ((kbdFD = open( terminalName.local8Bit(), O_RDWR | O_NDELAY)) < 0) { -+ qDebug( "Cannot open %s (%s)", terminalName.latin1(), -+ strerror(errno)); -+ } else { -+ // Clear pending input -+ char buf[2]; -+ while (read(kbdFD, buf, 1) > 0) { } - -- numLock = FALSE; -- sharp_kbdctl_modifstat st; -- int dev = ::open("/dev/sharp_kbdctl", O_RDWR); -- if( dev >= 0 ) { -- memset(&st, 0, sizeof(st)); -- st.which = 3; -- int ret = ioctl(dev, SHARP_KBDCTL_GETMODIFSTAT, (char*)&st); -- if( !ret ) -- numLock = (bool)st.stat; -- ::close(dev); -+ notifier = new QSocketNotifier( kbdFD, QSocketNotifier::Read, this ); -+ connect(notifier, SIGNAL(activated(int)),this, SLOT(readKeyboardData())); - } - #endif --#if defined(QT_QWS_IPAQ) -- // iPAQ Action Key has ScanCode 0x60: 0x60|0x80 = 0xe0 == extended mode 1 ! -- ipaq_return_pressed = FALSE; --#endif --#ifdef QT_QWS_AUTOREPEAT_MANUALLY -- rep = new QWSKeyboardRepeater(this); --#endif -- currentPC101 = this; - } - --QWSPC101KeyboardHandler::~QWSPC101KeyboardHandler() -+QWSVFbKeyboardHandler::~QWSVFbKeyboardHandler() - { -- if ( currentPC101 == this ) -- currentPC101 = 0; -+#ifndef QT_NO_QWS_VFB -+ if ( kbdFD >= 0 ) -+ close( kbdFD ); -+ delete [] kbdBuffer; -+#endif - } - --void QWSPC101KeyboardHandler::doKey(uchar code) -+ -+void QWSVFbKeyboardHandler::readKeyboardData() - { -- const QWSServer::KeyMap *currentKey = 0; -- int keyCode = Qt::Key_unknown; -- bool release = false; -- int keypad = 0; -+#ifndef QT_NO_QWS_VFB -+ int n; -+ do { -+ n = read(kbdFD, kbdBuffer+kbdIdx, kbdBufferLen - kbdIdx ); -+ if ( n > 0 ) -+ kbdIdx += n; -+ } while ( n > 0 ); - --#ifndef QT_QWS_USE_KEYCODES --#if defined(QT_QWS_IPAQ) -- // map ipaq 'action' key (0x60, 0xe0) -- if ((code & 0x7f) == 0x60) { --#if defined(QT_KEYPAD_MODE) -- // to keycode for select (keypad mode) -- code = (code & 0x80) | 116; --#else -- // to keycode for space. (no keypad mode0 -- code = (code & 0x80) | 57; --#endif -+ int idx = 0; -+ while ( kbdIdx - idx >= (int)sizeof( QVFbKeyData ) ) { -+ QVFbKeyData *kd = (QVFbKeyData *)(kbdBuffer + idx); -+ if ( kd->unicode == 0 && kd->modifiers == 0 && kd->press ) { -+ // magic exit key -+ qWarning( "Instructed to quit by Virtual Keyboard" ); -+ qApp->quit(); -+ } -+ processKeyEvent( kd->unicode&0xffff, kd->unicode>>16, -+ kd->modifiers, kd->press, kd->repeat ); -+ idx += sizeof( QVFbKeyData ); - } --#endif - --#if !defined(QT_QWS_SL5XXX) -- if (code == 224 --#if defined(QT_QWS_IPAQ) -- && !ipaq_return_pressed --#endif -- ) { -- // extended -- extended = 1; -- return; -- } -- else if (code == 225) { -- // extended 2 -- extended = 2; -- return; -- } --#endif -+ int surplus = kbdIdx - idx; -+ for ( int i = 0; i < surplus; i++ ) -+ kbdBuffer[i] = kbdBuffer[idx+i]; -+ kbdIdx = surplus; - #endif -+} - - -- /*------------------------------------------------------------------ -- First find the Qt KeyCode -- ------------------------------------------------------------------*/ -- -- if (code & 0x80) { -- release = true; -- code &= 0x7f; -- } -- --#ifndef QT_QWS_USE_KEYCODES -- if (extended == 1) { -- currentKey = overrideMap ? overrideMap->find( code+0xe000 ) : 0; -- if ( currentKey ) -- keyCode = currentKey->key_code; -- else -- switch (code) { -- case 72: -- keyCode = Qt::Key_Up; -- break; -- case 75: -- keyCode = Qt::Key_Left; -- break; -- case 77: -- keyCode = Qt::Key_Right; -- break; -- case 80: -- keyCode = Qt::Key_Down; -- break; -- case 82: -- keyCode = Qt::Key_Insert; -- break; -- case 71: -- keyCode = Qt::Key_Home; -- break; -- case 73: -- keyCode = Qt::Key_Prior; -- break; -- case 83: -- keyCode = Qt::Key_Delete; -- break; -- case 79: -- keyCode = Qt::Key_End; -- break; -- case 81: -- keyCode = Qt::Key_Next; -- break; -- case 28: -- keyCode = Qt::Key_Enter; -- break; -- case 53: -- keyCode = Qt::Key_Slash; -- break; -- case 0x1d: -- keyCode = Qt::Key_Control; -- break; -- case 0x2a: -- keyCode = Qt::Key_SysReq; -- break; -- case 0x38: -- keyCode = Qt::Key_Alt; -- break; -- case 0x5b: -- keyCode = Qt::Key_Super_L; -- break; -- case 0x5c: -- keyCode = Qt::Key_Super_R; -- break; -- case 0x5d: -- keyCode = Qt::Key_Menu; -- break; -- } -- } else if ( extended == 2 ) { -- switch (code) { -- case 0x1d: -- return; -- case 0x45: -- keyCode = Qt::Key_Pause; -- break; -- } -- } else --#endif -- { --#if defined(QT_QWS_SL5XXX) -- if ( fn && !meta && (code >= 0x42 && code <= 0x52) ) { -- ushort unicode=0xffff; -- int scan=0; -- if ( code == 0x42 ) { unicode='X'-'@'; scan=Key_X; } // Cut -- else if ( code == 0x43 ) { unicode='C'-'@'; scan=Key_C; } // Copy -- else if ( code == 0x44 ) { unicode='V'-'@'; scan=Key_V; } // Paste -- else if ( code == 0x52 ) { unicode='Z'-'@'; scan=Key_Z; } // Undo -- if ( scan ) { -- processKeyEvent( unicode, scan, ControlButton, !release, FALSE ); -- return; -- } -- } --#endif -- currentKey = overrideMap ? overrideMap->find( code ) : 0; -- if ( !currentKey && code < keyMSize ) { -- currentKey = &QWSServer::keyMap()[code]; -- } -- if ( currentKey ) -- keyCode = currentKey->key_code; -- --#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) // need autorepeat implemented here? -- bool repeatable = TRUE; - --#if defined(QT_QWS_IPAQ) -- switch (code) { --#if defined(QT_QWS_SL5XXX) --#if defined(QT_KEYPAD_MODE) -- case 0x7a: -- keyCode = Key_Call; -- repeatable = FALSE; -- break; -- case 0x7b: -- keyCode = Key_Context1; -- repeatable = FALSE; -- break; -- case 0x7c: -- keyCode = Key_Back; -- repeatable = FALSE; -- break; -- case 0x7d: -- keyCode = Key_Hangup; -- repeatable = FALSE; -- break; --#else -- case 0x7a: case 0x7b: case 0x7c: case 0x7d: -- keyCode = code - 0x7a + Key_F9; -- repeatable = FALSE; -- break; --#endif -- case 0x79: -- keyCode = Key_F34; -- repeatable = FALSE; -- break; --#endif -- case 0x78: --# if defined(QT_QWS_IPAQ) -- keyCode = Key_F24; // record --# else -- keyCode = Key_Escape; --# endif -- repeatable = FALSE; -- break; -- case 0x60: -- keyCode = Key_Return; --# ifdef QT_QWS_IPAQ -- ipaq_return_pressed = !release; --# endif -- break; -- case 0x67: -- keyCode = Key_Right; -- break; -- case 0x69: -- keyCode = Key_Up; -- break; -- case 0x6a: -- keyCode = Key_Down; -- break; -- case 0x6c: -- keyCode = Key_Left; -- break; -- } --#endif - -- /*------------------------------------------------------------------ -- Then do special processing of magic keys -- ------------------------------------------------------------------*/ -+struct termios origTermData; - -+static void init_kbd(void) -+{ -+ struct termios termdata; - --#if defined(QT_QWS_SL5XXX) -- if ( release && ( keyCode == Key_F34 || keyCode == Key_F35 ) ) -- return; // no release for power and light keys -- if ( keyCode >= Key_F1 && keyCode <= Key_F35 -- || keyCode == Key_Escape || keyCode == Key_Home -- || keyCode == Key_Shift || keyCode == Key_Meta ) -- repeatable = FALSE; --#endif -+ tcgetattr( kbdFD, &origTermData ); -+ tcgetattr( kbdFD, &termdata ); - --#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) -- if ( qt_screen->isTransformed() -- && keyCode >= Qt::Key_Left && keyCode <= Qt::Key_Down ) -- { -- keyCode = xform_dirkey(keyCode); -- } --#endif -- --#ifdef QT_QWS_AUTOREPEAT_MANUALLY -- if ( repeatable && !release ) -- rep->start(prevuni,prevkey,modifiers); -- else -- rep->stop(); --#endif --#endif -- /* -- Translate shift+Key_Tab to Key_Backtab -- */ -- if (( keyCode == Key_Tab ) && shift ) -- keyCode = Key_Backtab; -- } -+ ioctl(kbdFD, KDSKBMODE, K_XLATE); - --#ifndef QT_QWS_USE_KEYCODES -- /* -- Keypad consists of extended keys 53 and 28, -- and non-extended keys 55 and 71 through 83. -- */ -- if (( extended == 1 ) ? (code == 53 || code == 28) : -- (code == 55 || ( code >= 71 && code <= 83 )) ) -- keypad = Qt::Keypad; --#else -- if ( code == 55 || code >= 71 && code <= 83 || code == 96 -- || code == 98 || code == 118 ) -- keypad = Qt::Keypad; --#endif -+ termdata.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP); -+ termdata.c_oflag = 0; -+ termdata.c_cflag = CREAD | CS8; -+ termdata.c_lflag = 0; -+ termdata.c_cc[VTIME]=0; -+ termdata.c_cc[VMIN]=1; -+ cfsetispeed(&termdata, 9600); -+ cfsetospeed(&termdata, 9600); -+ tcsetattr(kbdFD, TCSANOW, &termdata); -+} - -- // Virtual console switching -- int term = 0; -- if (ctrl && alt && keyCode >= Qt::Key_F1 && keyCode <= Qt::Key_F10) -- term = keyCode - Qt::Key_F1 + 1; -- else if (ctrl && alt && keyCode == Qt::Key_Left) -- term = QMAX(vtQws - 1, 1); -- else if (ctrl && alt && keyCode == Qt::Key_Right) -- term = QMIN(vtQws + 1, 10); -- if (term && !release) { -- ctrl = false; -- alt = false; --#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) -- ioctl(kbdFD, VT_ACTIVATE, term); --#endif -- return; -+static void done_kbd(void) -+{ -+ if (kbdFD >= 0) { -+ tcsetattr(kbdFD, TCSANOW, &origTermData); - } -+} - --#if defined(QT_QWS_SL5XXX) -- // Ctrl-Alt-Delete exits qws -- if (ctrl && alt && keyCode == Qt::Key_Delete) { -- qApp->quit(); -+static void vtSwitchHandler(int /*sig*/) -+{ -+ if (vtActive) { -+ qwsServer->enablePainting(false); -+ qt_screen->save(); -+ if (ioctl(kbdFD, VT_RELDISP, VT_ACKACQ) == 0) { -+ vtActive = false; -+ qwsServer->closeMouse(); -+ done_kbd(); -+ } -+ else { -+ qwsServer->enablePainting(true); -+ } -+ usleep(200000); - } --#else -- // Ctrl-Alt-Backspace exits qws -- if (ctrl && alt && keyCode == Qt::Key_Backspace) { -- qApp->quit(); -+ else { -+ if (ioctl(kbdFD, VT_RELDISP, VT_ACKACQ) == 0) { -+ init_kbd(); -+ qwsServer->enablePainting(true); -+ vtActive = true; -+ qt_screen->restore(); -+ qwsServer->openMouse(); -+ qwsServer->refresh(); -+ } - } --#endif -+ signal(VTSWITCHSIG, vtSwitchHandler); -+} - --#if defined(QT_QWS_SL5XXX) -- if (keyCode == Qt::Key_F22) { /* Fn key */ -- fn = !release; -- } else if ( keyCode == Key_NumLock ) { -- if ( release ) -- numLock = !numLock; -- } else --#endif - -- if (keyCode == Qt::Key_Alt) { -- alt = !release; -- } else if (keyCode == Qt::Key_Control) { -- ctrl = !release; -- } else if (keyCode == Qt::Key_Shift) { -- shift = !release; --#if defined(QT_QWS_SL5XXX) -- } else if (keyCode == Qt::Key_Meta) { -- meta = !release; --#endif -- } else if ( keyCode == Qt::Key_CapsLock && release ) { -- caps = !caps; --#if defined(_OS_LINUX_) && !defined(QT_QWS_SL5XXX) -- char leds; -- ioctl(0, KDGETLED, &leds); -- leds = leds & ~LED_CAP; -- if ( caps ) leds |= LED_CAP; -- ioctl(0, KDSETLED, leds); --#endif -- } - -- /*------------------------------------------------------------------ -- Then find the Unicode value and send the event -- ------------------------------------------------------------------*/ -- //If we map the keyboard to a non-latin1 layout, we may have -- //valid keys with unknown key codes. -- if ( currentKey || keyCode != Qt::Key_unknown ) { -- bool bAlt = alt; -- bool bCtrl = ctrl; -- bool bShift = shift; -- int unicode = 0xffff; -- if ( currentKey ) { --#if !defined(QT_QWS_SL5XXX) -- bool bCaps = shift || -- (caps ? QChar(QWSServer::keyMap()[code].unicode).isLetter() : FALSE); --#else -- bool bCaps = caps ^ shift; -- if (fn) { -- if ( shift ) { -- bCaps = bShift = FALSE; -- bCtrl = TRUE; -- } -- if ( meta ) { -- bCaps = bShift = TRUE; -- bAlt = TRUE; -- } -- } else if ( meta ) { -- bCaps = bShift = TRUE; -- } -- if ( code > 40 && caps ) { -- // fn-keys should only react to shift, not caps -- bCaps = bShift = shift; -- } -- if ( numLock ) { -- if ( keyCode != Key_Space && keyCode != Key_Tab ) -- bCaps = bShift = FALSE; -- } -- if ( keyCode == Key_Delete && (bAlt || bCtrl) ) { -- keyCode = Key_BraceLeft; -- unicode = '['; -- bCaps = bShift = bAlt = bCtrl = FALSE; -- } else if (keyCode == Qt::Key_F31 && bCtrl) { -- keyCode = Key_QuoteLeft; -- unicode = '`'; -- } else --#endif -- -- if (bCtrl) -- unicode = currentKey->ctrl_unicode; -- else if (bCaps) -- unicode = currentKey->shift_unicode; -- else -- unicode = currentKey->unicode; --#ifndef QT_QWS_USE_KEYCODES -- } else if ( extended == 1 ) { -- if ( keyCode == Qt::Key_Slash ) -- unicode = '/'; -- else if ( keyCode == Qt::Key_Enter ) -- unicode = 0xd; --#endif -- } -+class QWSRamsesKbPrivate; -+class QWSRamsesKeyboardHandler : public QWSKeyboardHandler -+{ -+public: -+ QWSRamsesKeyboardHandler( const QString& ); -+ virtual ~QWSRamsesKeyboardHandler(); - -- modifiers = 0; -- if ( bAlt ) modifiers |= AltButton; -- if ( bCtrl ) modifiers |= ControlButton; -- if ( bShift ) modifiers |= ShiftButton; -- if ( keypad ) modifiers |= Keypad; -+ virtual void processKeyEvent(int unicode, int keycode, int modifiers, -+ bool isPress, bool autoRepeat); - -- // looks wrong -- WWA -- bool repeat = FALSE; -- if (prevuni == unicode && prevkey == keyCode && !release) -- repeat = TRUE; -+private: -+ QWSRamsesKbPrivate *d; -+}; - -- processKeyEvent( unicode, keyCode, modifiers, !release, repeat ); - -- if (!release) { -- prevuni = unicode; -- prevkey = keyCode; -- } else { -- prevkey = prevuni = 0; -- } -- } --#ifndef QT_QWS_USE_KEYCODES -- extended = 0; --#endif --} -+class QWSRamsesKbPrivate : public QObject -+{ -+ Q_OBJECT -+public: -+ QWSRamsesKbPrivate( QWSRamsesKeyboardHandler *, const QString &device ); -+ ~QWSRamsesKbPrivate(); - -+private slots: -+ void readKeyboardData(); - --// --// Tty keyboard --// -+private: -+ void handleKey(unsigned char code, int n); - --QWSTtyKeyboardHandler::QWSTtyKeyboardHandler(const QString& device) -+ QWSRamsesKeyboardHandler *handler; -+ char rbuf[255]; -+ int rptr; -+}; -+ -+QWSRamsesKbPrivate::QWSRamsesKbPrivate( QWSRamsesKeyboardHandler *h, const QString &device ) -+ : handler(h), rptr(0) - { - #ifdef QT_QWS_DEVFS -- kbdFD=open(device.isEmpty() ? "/dev/vc/1" : device.latin1(), O_RDWR | O_NDELAY, 0); -+ kbdFD = ::open(device.isEmpty()?"/dev/vc/2":device.latin1(), O_RDWR|O_NDELAY, 0); - #else -- kbdFD=open(device.isEmpty() ? "/dev/tty0" : device.latin1(), O_RDWR | O_NDELAY, 0); -+ kbdFD = ::open(device.isEmpty()?"/dev/tty2":device.latin1(), O_RDWR|O_NDELAY, 0); - #endif - - if ( kbdFD >= 0 ) { -- QSocketNotifier *notifier; -- notifier = new QSocketNotifier( kbdFD, QSocketNotifier::Read, this ); -- connect( notifier, SIGNAL(activated(int)),this, -- SLOT(readKeyboardData()) ); -- -- // save for restore. -- tcgetattr( kbdFD, &origTermData ); -- -- struct termios termdata; -- tcgetattr( kbdFD, &termdata ); -- --#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) --# ifdef QT_QWS_USE_KEYCODES -- ioctl(kbdFD, KDSKBMODE, K_MEDIUMRAW); --# else -- ioctl(kbdFD, KDSKBMODE, K_RAW); --# endif --#endif -- -- termdata.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP); -- termdata.c_oflag = 0; -- termdata.c_cflag = CREAD | CS8; -- termdata.c_lflag = 0; -- termdata.c_cc[VTIME]=0; -- termdata.c_cc[VMIN]=1; -- cfsetispeed(&termdata, 9600); -- cfsetospeed(&termdata, 9600); -- tcsetattr(kbdFD, TCSANOW, &termdata); -- -- signal(VTSWITCHSIG, vtSwitchHandler); -- --#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) -- struct vt_mode vtMode; -- ioctl(kbdFD, VT_GETMODE, &vtMode); -- -- // let us control VT switching -- vtMode.mode = VT_PROCESS; -- vtMode.relsig = VTSWITCHSIG; -- vtMode.acqsig = VTSWITCHSIG; -- ioctl(kbdFD, VT_SETMODE, &vtMode); -- -- struct vt_stat vtStat; -- ioctl(kbdFD, VT_GETSTATE, &vtStat); -- vtQws = vtStat.v_active; --#endif -+ QSocketNotifier *notifier; -+ notifier = new QSocketNotifier( kbdFD, QSocketNotifier::Read, this ); -+ connect( notifier, SIGNAL(activated(int)),this, SLOT(readKeyboardData()) ); -+ } else { -+ qDebug( "Cannot open keyboard" ); - } --} -- --QWSTtyKeyboardHandler::~QWSTtyKeyboardHandler() --{ -- if (kbdFD >= 0) -- { -+ init_kbd(); - --#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) -- struct vt_mode vtMode; -- ioctl(kbdFD, VT_GETMODE, &vtMode); -+ struct vt_mode vtMode; -+ ioctl(kbdFD, VT_GETMODE, &vtMode); - -- /* Mickey says: "Better give up control of VT switching. -- * Hey, I really hate that OS-will-reacquire-resources on process-death -- * kind of thinking! -- */ -- vtMode.mode = VT_AUTO; -- vtMode.relsig = 0; -- vtMode.acqsig = 0; -- ioctl(kbdFD, VT_SETMODE, &vtMode); -+ // let us control VT switching -+ vtMode.mode = VT_PROCESS; -+ vtMode.relsig = VTSWITCHSIG; -+ vtMode.acqsig = VTSWITCHSIG; -+ ioctl(kbdFD, VT_SETMODE, &vtMode); - -- signal(VTSWITCHSIG, 0); -- qDebug( "~QWSTtyKeyboardHandler() - released VT." ); --#endif -+ struct vt_stat vtStat; -+ ioctl(kbdFD, VT_GETSTATE, &vtStat); -+ vtQws = vtStat.v_active; - --#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) -- ioctl(kbdFD, KDSKBMODE, K_XLATE); --#endif -- tcsetattr(kbdFD, TCSANOW, &origTermData); -- ::close(kbdFD); -- kbdFD = -1; -- } -+ signal(VTSWITCHSIG, vtSwitchHandler); - } - --void QWSTtyKeyboardHandler::readKeyboardData() -+QWSRamsesKbPrivate::~QWSRamsesKbPrivate() - { -- unsigned char buf[81]; -- int n = ::read(kbdFD, buf, 80 ); -- for ( int loop = 0; loop < n; loop++ ) -- doKey(buf[loop]); --} -+ signal(VTSWITCHSIG, 0); - --typedef struct { -- unsigned short key; -- unsigned short status; --} SamsungKeypadInput; -+ done_kbd(); - --QWSSamsungKeypadHandler::QWSSamsungKeypadHandler(const QString& device) --{ -- kbdFD=open(device.isEmpty() ? "/dev/keypad/0" : device.latin1(), O_RDONLY, 0); -- if( kbdFD < 0 ) -- qWarning("could not open keypad device"); -+ struct vt_mode vtMode; -+ ioctl(kbdFD, VT_GETMODE, &vtMode); -+ /* Mickey says: "Better give up control of VT switching. -+ * Hey, I really hate that OS-will-reacquire-resources on process-death -+ * kind of thinking! -+ */ -+ vtMode.mode = VT_AUTO; -+ vtMode.relsig = 0; -+ vtMode.acqsig = 0; -+ ioctl(kbdFD, VT_SETMODE, &vtMode); - -- if ( kbdFD >= 0 ) { -- QSocketNotifier *notifier; -- notifier = new QSocketNotifier( kbdFD, QSocketNotifier::Read, this ); -- connect( notifier, SIGNAL(activated(int)),this, -- SLOT(readKeyboardData()) ); -- } -+ ::close(kbdFD); -+ kbdFD = -1; - } - --QWSSamsungKeypadHandler::~QWSSamsungKeypadHandler() --{ -- if (kbdFD >= 0) -- { -- ::close(kbdFD); -- kbdFD = -1; -- } --} - --void QWSSamsungKeypadHandler::readKeyboardData() -+static inline int map_to_modif(int current_map) - { -- SamsungKeypadInput input; -- int n = ::read(kbdFD, &input, sizeof(SamsungKeypadInput) ); -- if( n < sizeof(SamsungKeypadInput) ) -- { -- qWarning("Error reading input from keypad device."); -- return; -- } -- unsigned short key = input.key; -- unsigned short unicode = 0; - int modifiers = 0; -- QWSServer::KeyMap *km = (overrideMap ? overrideMap->find( input.key ) : 0); -- if( km ) { -- key = km->key_code; -- unicode = km->unicode; -- } -- switch( key ) { --#ifdef QT_KEYPAD_MODE -- case Key_Menu: -- case Key_Back: -- case Key_Yes: -- case Key_No: -- case Key_Call: -- case Key_Hangup: -- case Key_Select: -- case Key_Context1: -- case Key_Context2: -- case Key_Context3: -- case Key_Context4: -- modifiers |= Qt::Keypad; -- break; --#endif -- } -- processKeyEvent( unicode, key, modifiers, input.status != 0, FALSE ); --} - --/* USB driver */ -+ if (current_map & KG_ALT) -+ modifiers |= Qt::ALT; -+ else if (current_map & KG_CTRL) -+ modifiers |= Qt::CTRL; -+ else if (current_map & KG_SHIFT) -+ modifiers |= Qt::SHIFT; - --QWSUsbKeyboardHandler::QWSUsbKeyboardHandler(const QString& device) --{ -- lastPress = 0; -- fd = ::open(device.isEmpty()?"/dev/input/event0":device.latin1(),O_RDONLY, 0); -- if ( fd >= 0 ) { -- QSocketNotifier *notifier; -- notifier = new QSocketNotifier( fd, QSocketNotifier::Read, this ); -- connect( notifier, SIGNAL(activated(int)),this, -- SLOT(readKeyboardData()) ); -- } -+ return modifiers; - } - --QWSUsbKeyboardHandler::~QWSUsbKeyboardHandler() --{ -- ::close(fd); --} -+struct { -+ const char *code; -+ unsigned short qtcode; -+} qtesc_lookup[] = { -+ { "\e[A", Qt::Key_Up }, -+ { "\e[B", Qt::Key_Down }, -+ { "\e[C", Qt::Key_Right }, -+ { "\e[D", Qt::Key_Left }, -+ { "\e[1~", Qt::Key_Home }, -+ { "\e[4~", Qt::Key_End }, -+ { "\e[5~", Qt::Key_PageUp }, -+ { "\e[6~", Qt::Key_PageDown }, - --struct Myinputevent { -+ { "\e[[A", Qt::Key_F1 }, -+ { "\e[[B", Qt::Key_F2 }, -+ { "\e[[C", Qt::Key_F3 }, -+ { "\e[[D", Qt::Key_F4 }, -+ { "\e[[E", Qt::Key_F5 }, -+ { "\e[17~", Qt::Key_F6 }, -+ { "\e[18~", Qt::Key_F7 }, -+ { "\e[19~", Qt::Key_F8 }, -+ { "\e[20~", Qt::Key_F9 }, -+ { "\e[21~", Qt::Key_F10 }, -+ { "\e[23~", Qt::Key_F11 }, -+ { "\e[24~", Qt::Key_F12 }, - -- unsigned int dummy1; -- unsigned int dummy2; -- unsigned short type; -- unsigned short code; -- unsigned int value; -+ // { "\ex", Qt::FieldExit }, -+ // { "\er", Qt::FieldReset }, - - }; - --void QWSUsbKeyboardHandler::readKeyboardData() --{ -- Myinputevent event; -- int n = ::read(fd, &event, sizeof(Myinputevent) ); -- if ( n != 16 ) -- return; --#ifdef QT_QWS_TIP2 -- // custom scan codes - translate them and create a key event immediately -- if( overrideMap && event.value == 0 || overrideMap->find( event.value ) ) -- { -- if( event.value ) -- { -- int modifiers = 0; -- QWSServer::KeyMap *km = overrideMap->find( event.value ); -- switch( km->unicode ) -- { -- case Key_Menu: -- case Key_Back: -- case Key_Yes: -- case Key_No: -- case Key_Call: -- case Key_Hangup: -- case Key_Select: -- case Key_Context1: -- case Key_Context2: -- case Key_Context3: -- case Key_Context4: -- { -- modifiers |= Keypad; -- break; -- } -- default: -- break; -- } -- if( km->key_code == Key_F10 && QCopChannel::isRegistered( "QPE/System" ) ) { -- //hardcoded for now -- QCopChannel::send( "QPE/System", "showHomeScreen()" ); -- } else { -- processKeyEvent( km->unicode, km->key_code, modifiers, -- TRUE, FALSE ); -- } -- lastPress = km; -- } -- else if( lastPress ) -- { -- processKeyEvent( lastPress->unicode, lastPress->key_code, 0, -- FALSE, FALSE ); -- lastPress = 0; -- } -- } -- else --#endif -- { -- int key=event.code; -- if(key==103) { -- processKeyEvent( 0, Qt::Key_Up, 0, event.value!=0, false ); -- } else if(key==106) { -- processKeyEvent( 0, Qt::Key_Right, 0, event.value!=0, false ); -- } else if(key==108) { -- processKeyEvent( 0, Qt::Key_Down, 0, event.value!=0, false ); -- } else if(key==105) { -- processKeyEvent( 0, Qt::Key_Left, 0, event.value!=0, false ); -- } else { -- if(event.value==0) { -- key=key | 0x80; -- } -- doKey(key); -- } -- } --} -- --/* -- * YOPY buttons driver -- * Contributed by Ron Victorelli (victorrj at icubed.com) -- */ -+struct { -+ unsigned char code; -+ unsigned short qtcode; -+} qtkey_lookup[] = { -+ { 0x08, Qt::Key_Backspace }, -+ { 0x09, Qt::Key_Tab }, -+ { 0x0d, Qt::Key_Enter }, -+ { 0x1b, Qt::Key_Escape }, -+}; - --QWSyopyButtonsHandler::QWSyopyButtonsHandler() : QWSKeyboardHandler() -+void QWSRamsesKbPrivate::handleKey(unsigned char code, int n) - { --#ifdef QT_QWS_YOPY -- terminalName = "/dev/tty1"; -- buttonFD = -1; -- notifier = 0; -- -- if ((buttonFD = ::open(terminalName, O_RDWR | O_NDELAY, 0)) < 0) { -- qFatal("Cannot open %s\n", terminalName.latin1()); -- } else { -+ int qtKeyCode = Qt::Key_unknown; -+ unsigned int i; - -- tcsetpgrp(buttonFD, getpgid(0)); -+ //qDebug("\nhandleKey %02x %d %c", code, n, code >= ' ' ? code : ' '); - -- /* put tty into "straight through" mode. -- */ -- if (tcgetattr(buttonFD, &oldT) < 0) { -- qFatal("Linux-kbd: tcgetattr failed"); -- } -+ // Single keys -+ if ((n==1) && (rptr==0)) { -+ qtKeyCode = code; -+ for (i=0; i < sizeof(qtkey_lookup)/sizeof(qtkey_lookup[0]); i++) { -+ if (qtkey_lookup[i].code == code) { -+ qtKeyCode = qtkey_lookup[i].qtcode; -+ code = 0; -+ break; -+ } -+ } -+ } else - -- newT = oldT; -- newT.c_lflag &= ~(ICANON | ECHO | ISIG); -- newT.c_iflag &= ~(ISTRIP | IGNCR | ICRNL | INLCR | IXOFF | IXON); -- newT.c_iflag |= IGNBRK; -- newT.c_cc[VMIN] = 0; -- newT.c_cc[VTIME] = 0; -+ // Alt- sequence -+ if ((n==1) && (rptr==1) && (rbuf[0] == '\e')) { -+ //qDebug("alt-key %d", code); -+ handler->processKeyEvent(0, Qt::Key_Alt, 0, 1, 0); -+ handler->processKeyEvent(0, code-32, Qt::ALT, 1, 0); -+ handler->processKeyEvent(0, code-32, Qt::ALT, 0, 0); -+ handler->processKeyEvent(0, Qt::Key_Alt, 0, 0, 0); -+ rptr = 0; -+ return; -+ } else - -+ // End of a function key sequence -+ if ((n==1) && (rptr!=0)) { -+ rbuf[rptr++] = code; -+ rbuf[rptr] = 0; -+ for (i=0; i < sizeof(qtesc_lookup)/sizeof(qtesc_lookup[0]); i++) { -+ if (strncmp(rbuf, qtesc_lookup[i].code, sizeof(rbuf)) == 0) { -+ qtKeyCode = qtesc_lookup[i].qtcode; -+ code = 0; -+ break; -+ } -+ } -+ if (code != 0) { -+ //qWarning("no entry in key sequence table for %s", &rbuf[1]); -+ int oldrptr = rptr; -+ rptr = 0; -+ for (i=0; i <= oldrptr; i++) { -+ handleKey(rbuf[i], 1); -+ } -+ return; -+ } -+ rptr = 0; -+ } else - -- if (tcsetattr(buttonFD, TCSANOW, &newT) < 0) { -- qFatal("Linux-kbd: TCSANOW tcsetattr failed"); -- } -+ // Middle of a function key sequence -+ { -+ if (rptr < sizeof(rbuf)) -+ rbuf[rptr++] = code; -+ return; -+ } - -- if (ioctl(buttonFD, KDSKBMODE, K_MEDIUMRAW) < 0) { -- qFatal("Linux-kbd: KDSKBMODE tcsetattr failed"); -- } -+ //qDebug(" code 0x%2x %d -> qtKeyCode 0x%04x", code, code, qtKeyCode); - -- notifier = new QSocketNotifier( buttonFD, QSocketNotifier::Read, this ); -- connect( notifier, SIGNAL(activated(int)),this, -- SLOT(readKeyboardData()) ); -- } --#endif -+ handler->processKeyEvent(code, qtKeyCode, 0, 1, 0); -+ handler->processKeyEvent(code, qtKeyCode, 0, 0, 0); - } - --QWSyopyButtonsHandler::~QWSyopyButtonsHandler() --{ --#ifdef QT_QWS_YOPY -- if ( buttonFD > 0 ) { -- ::close( buttonFD ); -- buttonFD = -1; -- } --#endif --} - --void QWSyopyButtonsHandler::readKeyboardData() -+void QWSRamsesKbPrivate::readKeyboardData() - { --#ifdef QT_QWS_YOPY -- uchar buf[1]; -- char c='1'; -- int fd; -- -- int n = ::read(buttonFD,buf,1); -- if (n<0) { -- qDebug("Keyboard read error %s",strerror(errno)); -- } else { -- uint code = buf[0]&YPBUTTON_CODE_MASK; -- bool press = !(buf[0]&0x80); -- // printf("Key=%d/%d/%d\n",buf[1],code,press); -- int k=(-1); -- switch(code) { -- case 39: k=Qt::Key_Up; break; -- case 44: k=Qt::Key_Down; break; -- case 41: k=Qt::Key_Left; break; -- case 42: k=Qt::Key_Right; break; -- case 56: k=Qt::Key_F1; break; //windows -- case 29: k=Qt::Key_F2; break; //cycle -- case 24: k=Qt::Key_F3; break; //record -- case 23: k=Qt::Key_F4; break; //mp3 -- case 4: k=Qt::Key_F5; break; // PIMS -- case 1: k=Qt::Key_Escape; break; // Escape -- case 40: k=Qt::Key_Up; break; // prev -- case 45: k=Qt::Key_Down; break; // next -- case 35: if( !press ) { -- fd = ::open("/proc/sys/pm/sleep",O_RDWR,0); -- if( fd >= 0 ) { -- ::write(fd,&c,sizeof(c)); -- ::close(fd); -- // -- // Updates all widgets. -- // -- QWidgetList *list = QApplication::allWidgets(); -- QWidgetListIt it( *list ); // iterate over the widgets -- QWidget * w; -- while ( (w=it.current()) != 0 ) { // for each widget... -- ++it; -- w->update(); -- } -- delete list; -- // qApp->desktop()->repaint(); -- } -- } -- break; -- -- default: k=(-1); break; -- } -- -- if ( k >= 0 ) { -- qwsServer->processKeyEvent( 0, k, 0, press, false ); -- } -+ unsigned char buf[81]; -+ int n = read(kbdFD, buf, 80 ); -+ for ( int loop = 0; loop < n; loop++ ) { -+ handleKey(buf[loop], n-loop); - } --#endif - } - - --/* -- * vr41xx buttons driver -- */ -- --QWSVr41xxButtonsHandler::QWSVr41xxButtonsHandler() : QWSKeyboardHandler() --{ --#ifdef QT_QWS_CASSIOPEIA -- terminalName = "/dev/buttons"; -- buttonFD = -1; -- notifier = 0; - -- if ((buttonFD = ::open(terminalName, O_RDWR | O_NDELAY, 0)) < 0) -- { -- qWarning("Cannot open %s\n", terminalName.latin1()); -- } -- -- if ( buttonFD >= 0 ) { -- notifier = new QSocketNotifier( buttonFD, QSocketNotifier::Read, this ); -- connect( notifier, SIGNAL(activated(int)),this, -- SLOT(readKeyboardData()) ); -- } - -- kbdBufferLen = 80; -- kbdBuffer = new unsigned char [kbdBufferLen]; -- kbdIdx = 0; --#endif --} - --QWSVr41xxButtonsHandler::~QWSVr41xxButtonsHandler() -+QWSRamsesKeyboardHandler::QWSRamsesKeyboardHandler( const QString &device ) - { --#ifdef QT_QWS_CASSIOPEIA -- if ( buttonFD > 0 ) { -- ::close( buttonFD ); -- buttonFD = -1; -- } -- delete notifier; -- notifier = 0; -- delete [] kbdBuffer; --#endif -+ d = new QWSRamsesKbPrivate( this, device ); - } - --void QWSVr41xxButtonsHandler::readKeyboardData() -+QWSRamsesKeyboardHandler::~QWSRamsesKeyboardHandler() - { --#ifdef QT_QWS_CASSIOPEIA -- int n = 0; -- do { -- n = ::read(buttonFD, kbdBuffer+kbdIdx, kbdBufferLen - kbdIdx ); -- if ( n > 0 ) -- kbdIdx += n; -- } while ( n > 0 ); -- -- int idx = 0; -- while ( kbdIdx - idx >= 2 ) { -- unsigned char *next = kbdBuffer + idx; -- unsigned short *code = (unsigned short *)next; -- int keycode = Qt::Key_unknown; -- switch ( (*code) & 0x0fff ) { -- case 0x7: -- keycode = Qt::Key_Up; -- break; -- case 0x9: -- keycode = Qt::Key_Right; -- break; -- case 0x8: -- keycode = Qt::Key_Down; -- break; -- case 0xa: -- keycode = Qt::Key_Left; -- break; -- case 0x3: -- keycode = Qt::Key_Up; -- break; -- case 0x4: -- keycode = Qt::Key_Down; -- break; -- case 0x1: -- keycode = Qt::Key_Return; -- break; -- case 0x2: -- keycode = Qt::Key_F4; -- break; -- default: -- qDebug("Unrecognised key sequence %d", (int)code ); -- } -- if ( (*code) & 0x8000 ) -- processKeyEvent( 0, keycode, 0, FALSE, FALSE ); -- else -- processKeyEvent( 0, keycode, 0, TRUE, FALSE ); --/* -- unsigned short t = *code; -- for ( int i = 0; i < 16; i++ ) { -- keycode = (t & 0x8000) ? Qt::Key_1 : Qt::Key_0; -- int unicode = (t & 0x8000) ? '1' : '0'; -- processKeyEvent( unicode, keycode, 0, TRUE, FALSE ); -- processKeyEvent( unicode, keycode, 0, FALSE, FALSE ); -- t <<= 1; -- } -- keycode = Qt::Key_Space; --// processKeyEvent( ' ', keycode, 0, TRUE, FALSE ); --// processKeyEvent( ' ', keycode, 0, FALSE, FALSE ); --*/ -- idx += 2; -- } -- -- int surplus = kbdIdx - idx; -- for ( int i = 0; i < surplus; i++ ) -- kbdBuffer[i] = kbdBuffer[idx+i]; -- kbdIdx = surplus; --#endif -+ delete d; - } - -- --/* -- * Virtual framebuffer keyboard driver -- */ -- --#ifndef QT_NO_QWS_VFB --#include "qvfbhdr.h" --extern int qws_display_id; --#endif -- --QWSVFbKeyboardHandler::QWSVFbKeyboardHandler() -+void QWSRamsesKeyboardHandler::processKeyEvent(int unicode, int keycode, -+ int modifiers, bool isPress, bool autoRepeat) - { -- kbdFD = -1; --#ifndef QT_NO_QWS_VFB -- kbdIdx = 0; -- kbdBufferLen = sizeof( QVFbKeyData ) * 5; -- kbdBuffer = new unsigned char [kbdBufferLen]; -- -- terminalName = QString(QT_VFB_KEYBOARD_PIPE).arg(qws_display_id); -- -- if ((kbdFD = ::open(terminalName.local8Bit().data(), O_RDWR | O_NDELAY)) < 0) { -- qDebug( "Cannot open %s (%s)", terminalName.latin1(), -- strerror(errno)); -- } else { -- // Clear pending input -- char buf[2]; -- while (::read(kbdFD, buf, 1) > 0) { } -- -- notifier = new QSocketNotifier( kbdFD, QSocketNotifier::Read, this ); -- connect(notifier, SIGNAL(activated(int)),this, SLOT(readKeyboardData())); -+ // Virtual console switching -+ int term = 0; -+ bool ctrl = modifiers & Qt::ControlButton; -+ bool alt = modifiers & Qt::AltButton; -+ if (ctrl && alt && keycode >= Qt::Key_F1 && keycode <= Qt::Key_F10) -+ term = keycode - Qt::Key_F1 + 1; -+ else if (ctrl && alt && keycode == Qt::Key_Left) -+ term = QMAX(vtQws - 1, 1); -+ else if (ctrl && alt && keycode == Qt::Key_Right) -+ term = QMIN(vtQws + 1, 10); -+ if (term && !isPress) { -+ ioctl(kbdFD, VT_ACTIVATE, term); -+ return; - } --#endif --} - --QWSVFbKeyboardHandler::~QWSVFbKeyboardHandler() --{ --#ifndef QT_NO_QWS_VFB -- if ( kbdFD >= 0 ) -- ::close( kbdFD ); -- delete [] kbdBuffer; --#endif -+ QWSKeyboardHandler::processKeyEvent( unicode, keycode, modifiers, isPress, autoRepeat ); - } - - --void QWSVFbKeyboardHandler::readKeyboardData() --{ --#ifndef QT_NO_QWS_VFB -- int n; -- do { -- n = ::read(kbdFD, kbdBuffer+kbdIdx, kbdBufferLen - kbdIdx ); -- if ( n > 0 ) -- kbdIdx += n; -- } while ( n > 0 ); -- -- int idx = 0; -- while ( kbdIdx - idx >= (int)sizeof( QVFbKeyData ) ) { -- QVFbKeyData *kd = (QVFbKeyData *)(kbdBuffer + idx); -- if ( kd->unicode == 0 && kd->modifiers == 0 && kd->press ) { -- // magic exit key -- qWarning( "Instructed to quit by Virtual Keyboard" ); -- qApp->quit(); -- } --#ifdef QT_KEYPAD_MODE -- QWSServer::KeyMap *currentKey = overrideMap ? overrideMap->find( (kd->unicode >> 16) ) : 0; -- if ( currentKey ) -- processKeyEvent( currentKey->unicode, currentKey->key_code, -- kd->modifiers, kd->press, kd->repeat ); -- else --#endif -- processKeyEvent( kd->unicode&0xffff, kd->unicode>>16, -- kd->modifiers, kd->press, kd->repeat ); -- -- idx += sizeof( QVFbKeyData ); -- } -- -- int surplus = kbdIdx - idx; -- for ( int i = 0; i < surplus; i++ ) -- kbdBuffer[i] = kbdBuffer[idx+i]; -- kbdIdx = surplus; --#endif --} -- - - /* - * keyboard driver instantiation -@@ -1836,26 +565,12 @@ - } else { - type = spec; - } -- if ( type == "Buttons" ) { --#if defined(QT_QWS_SIMPAD) -- qDebug( "QWSKeyboardHandler: using SIMpad switches handler..." ); -- handler = new QWSsimpadButtonsHandler(); --#elif defined(QT_QWS_YOPY) -- handler = new QWSyopyButtonsHandler(); --#elif defined(QT_QWS_CASSIOPEIA) -- handler = new QWSVr41xxButtonsHandler(); --#endif -- } else if ( type == "QVFbKeyboard" ) { -+ -+ if ( type == "QVFbKeyboard" ) { - handler = new QWSVFbKeyboardHandler(); -- } else if ( type == "USB" ) { -- handler = new QWSUsbKeyboardHandler(device); - } else if ( type == "TTY" ) { -- handler = new QWSTtyKeyboardHandler(device); -- } -- else if( type == "Samsung" ) { -- handler = new QWSSamsungKeypadHandler(device); -- } -- else { -+ handler = new QWSRamsesKeyboardHandler(device); -+ } else { - qWarning( "Keyboard type %s:%s unsupported", spec.latin1(), device.latin1() ); - } - -@@ -1864,231 +579,6 @@ - - #include "qkeyboard_qws.moc" - --#endif // QNX6 -- --/*! -- \internal -- Returns the map of scancodes to Qt key codes and text --*/ --const QWSServer::KeyMap *QWSServer::keyMap() --{ -- return keyM; --} -- -- --/* -- * SIMpad switches handler -- * (C) 2003 Michael 'Mickey' Lauer -- */ -- -- --QWSsimpadButtonsHandler::QWSsimpadButtonsHandler() -- :QWSKeyboardHandler(), fd( -1 ), -- repeatdelay( 700 ), repeatperiod( 80 ), -- lastCode( 0 ), lastPress( 0 ), -- k( -1 ), shiftKeyPressed( 0 ), shiftUsed( false ) --{ -- qDebug( "SimpadButtonsHandler() - V4.1" ); -- fd = ::open( SIMPAD_SWITCHES_DEVICE, O_RDWR | O_NDELAY, 0 ); -- if ( fd < 0 ) -- { -- qWarning( "SimpadButtonsHandler(): can't open %s", SIMPAD_SWITCHES_DEVICE ); -- return; -- } -- -- notifier = new QSocketNotifier( fd, QSocketNotifier::Read, this ); -- connect( notifier, SIGNAL( activated(int) ),this, SLOT( readSwitchesData() ) ); -- -- repeater = new QTimer(this); -- connect(repeater, SIGNAL(timeout()), this, SLOT(autoRepeat())); -- --} -- -- --QWSsimpadButtonsHandler::~QWSsimpadButtonsHandler() --{ -- qDebug( "~SimpadButtonsHandler()" ); -- if ( fd > 0 ) -- { -- ::close( fd ); -- fd = -1; -- } --} -- -- --void QWSsimpadButtonsHandler::readSwitchesData() --{ -- qDebug( "SimpadButtonsHandler() - detected switches action" ); -- -- if ( ::read( fd, &switches, sizeof switches ) < 0 ) -- { -- qWarning( "SimpadButtonsHandler() - switches read error!" ); -- return; -- } -- -- qDebug( "SimpadButtonsHandler() - Shift: %0x [used: %0x] + Event = %0x | %0x", -- shiftKeyPressed, shiftUsed, switches.events[0], switches.states[0] ); -- -- bool press = switches.states[0]; // == switches.event[0]; -- int code = switches.events[0]; -- -- //========================================================================= -- -- /** -- * Work around a bug in the kernel keyboard driver emitting -- * bogus events when pressing multiple switches at once -- **/ -- -- if ( lastCode == 0 ) -- { -- // first press ever -- eventTimer.start(); -- lastPress = press; -- lastCode = code; -- } -- else -- { -- int interval = eventTimer.restart(); -- qDebug( "event interval = %d", interval ); -- if ( code == lastCode && interval < 10 ) -- { -- qDebug( "event interval too small - ignoring bogus event" ); -- qDebug( "did I say i hate buggy kernel drivers? :-D" ); -- return; -- } -- -- lastPress = press; -- lastCode = code; -- } -- -- /** -- * Actually it may also be a hardware problem, but I really don't like -- * to review kernel code for further inquiry. So just being lazy and -- * do the workaround in user space :-D -- **/ -- -- //===================================================================== -- -- if ( shiftKeyPressed ) -- { -- // a shift key obviously is being held -- qDebug( "while shift key is being held..." ); -- -- if ( code != shiftKeyPressed ) -- { -- // another key is being touched - that means shift mode for us! -- qDebug( " another key is being touched -> shift use now = true" ); -- -- shiftUsed = true; -- -- if ( shiftKeyPressed == SIMPAD_SWITCH_LOWER ) // SHIFT 1 -- { -- qDebug( " shift mode 1" ); -- switch(code) -- { -- case SIMPAD_SWITCH_UP: k = Qt::Key_F9; break; // Shift1-Up = Calendar -- case SIMPAD_SWITCH_DOWN: k = Qt::Key_F10; break; // Shift1-Down = Contacts -- case SIMPAD_SWITCH_LEFT: k = Qt::Key_F13; break; // Shift1-Left = Mail -- case SIMPAD_SWITCH_RIGHT: k = Qt::Key_F11; break; // Shift1-Up = Menu -- case SIMPAD_SWITCH_UPPER: k = Qt::Key_F12; break; // Shift1-Upper = Home -- default: k=-1; qWarning( "SimpadButtonsHandler() - unhandled event for Shift 1 !" ); break; -- } -- } -- else if ( shiftKeyPressed == SIMPAD_SWITCH_UPPER ) // SHIFT 2 -- { -- qDebug( " shift mode 2" ); -- switch(code) -- { -- case SIMPAD_SWITCH_UP: k = Qt::Key_F5; break; // Shift2-Up = F5 -- case SIMPAD_SWITCH_DOWN: k = Qt::Key_F6; break; // Shift2-Down = F6 -- case SIMPAD_SWITCH_LEFT: k = Qt::Key_F7; break; // Shift2-Left = F7 -- case SIMPAD_SWITCH_RIGHT: k = Qt::Key_F8; break; // Shift2-Up = F8 -- case SIMPAD_SWITCH_LOWER: k = Qt::Key_F9; break; // Shift2-Lower = F9 -- default: k=-1; qWarning( "SimpadButtonsHandler() - unhandled event for Shift 2!" ); break; -- } -- } -- } -- else -- { -- qDebug( " shift key has been released. checking if being used..." ); -- shiftKeyPressed = 0; -- -- if ( !shiftUsed ) -- { -- qDebug( " ... has _not_ being used -> really emit the key" ); -- k = ( code == SIMPAD_SWITCH_UPPER ? Qt::Key_Escape : Qt::Key_Return ); -- qDebug( "Emitting key = %d (pressed)", k ); -- processKeyEvent( 0, k, 0, true, true ); -- qDebug( "Emitting key = %d (released)", k ); -- processKeyEvent( 0, k, 0, false, true ); -- return; -- } -- else -- { -- qDebug( " ... has being used -> doing nothing" ); -- return; -- } -- } -- } -- else -- { -- qDebug( "standard mode - no shift yet..." ); -- -- switch(code) -- { -- case SIMPAD_SWITCH_UP: k = Qt::Key_Up; break; -- case SIMPAD_SWITCH_DOWN: k = Qt::Key_Down; break; -- case SIMPAD_SWITCH_LEFT: k = Qt::Key_Left; break; -- case SIMPAD_SWITCH_RIGHT: k = Qt::Key_Right; break; -- case SIMPAD_SWITCH_POWER: k = Qt::Key_F34; break; // Power Button -- -- case SIMPAD_SWITCH_UPPER: k=-1; shiftKeyPressed = press? code:0; shiftUsed = false; qDebug( "shiftkey pressed now = %d", shiftKeyPressed ); return; -- case SIMPAD_SWITCH_LOWER: k=-1; shiftKeyPressed = press? code:0; shiftUsed = false; qDebug( "shiftkey pressed now = %d", shiftKeyPressed ); return; -- -- default: k=-1; qWarning( "SimpadButtonsHandler() - unhandled event!" ); break; -- } -- } -- -- if ( k == -1 ) -- { -- qDebug( "no key to emit - returning." ); -- return; -- } -- -- bool repeatable = ( k == Qt::Key_Up || k == Qt::Key_Down || -- k == Qt::Key_Right || k == Qt::Key_Left ); -- -- qDebug( "key to emit = %d [%s] [repeat=%s]", k, -- press ? "press" : "release", -- repeatable ? "true":"false" ); -- --#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) -- if ( qt_screen->isTransformed() && k >= Qt::Key_Left && k <= Qt::Key_Down ) -- { -- qDebug( "SimpadButtonsHandler() - We are transformed! Correcting..." ); -- int oldK = k; -- k = xform_dirkey( k ); -- qDebug( "SimpadButtonsHandler() - Old Key: %d - New Key %d", oldK, k ); -- } --#endif -- -- if ( repeatable && press ) -- repeater->start( repeatdelay, true ); -- else -- repeater->stop(); -- -- qwsServer->processKeyEvent( 0, k, 0, press, false ); --} -- -- --void QWSsimpadButtonsHandler::autoRepeat() --{ -- qDebug( "Emitting key = %d (released)", k ); -- processKeyEvent( 0, k, 0, false, true ); -- qDebug( "Emitting key = %d (pressed)", k ); -- processKeyEvent( 0, k, 0, true, true ); -- repeater->start(repeatperiod); --} -+#endif // QT_NO_QWS_KEYBOARD - - --#endif // QT_NO_QWS_KEYBOARD ---- qt-2.3.10/src/kernel/qwindowsystem_qws.cpp~ramses-keyboard -+++ qt-2.3.10/src/kernel/qwindowsystem_qws.cpp -@@ -1791,6 +1791,7 @@ - } - - #ifndef QT_NO_QWS_KEYBOARD -+#ifndef QT_QWS_RAMSES - static int keyUnicode(int keycode) - { - const QWSServer::KeyMap *km = QWSServer::keyMap(); -@@ -1803,6 +1804,7 @@ - return 0xffff; - } - #endif -+#endif - /*! - Send a key event. You can use this to send key events generated by - "virtual keyboards". -@@ -1845,8 +1847,10 @@ - - event.simpleData.unicode = - #ifndef QT_NO_QWS_KEYBOARD -+#ifndef QT_QWS_RAMSES - unicode < 0 ? keyUnicode(keycode) : - #endif -+#endif - unicode; - event.simpleData.keycode = keycode; - event.simpleData.modifiers = modifiers; diff --git a/packages/qte/qte-2.3.10/ramses/qkeyboard_qws.cpp b/packages/qte/qte-2.3.10/ramses/qkeyboard_qws.cpp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/qte/qte-2.3.10/ramses/qkeyboard_qws.h b/packages/qte/qte-2.3.10/ramses/qkeyboard_qws.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/qte/qte_2.3.10.bb b/packages/qte/qte_2.3.10.bb index 4c9d573f87..3acac40d15 100644 --- a/packages/qte/qte_2.3.10.bb +++ b/packages/qte/qte_2.3.10.bb @@ -6,7 +6,7 @@ LICENSE = "GPL QPL" DEPENDS = "zlib libpng jpeg tslib uicmoc-native" DEPENDS_ramses = "zlib libpng jpeg uicmoc-native" PROVIDES = "virtual/qte virtual/libqte2" -PR = "r7" +PR = "r8" SRC_URI = "ftp://ftp.trolltech.com/pub/qt/source/qt-embedded-${PV}-free.tar.gz \ file://qpe.patch;patch=1 \ @@ -36,10 +36,11 @@ SRC_URI_append_jornada720 = "file://kernel-keymap.patch;patch=1 " SRC_URI_append_jornada56x = "file://kernel-keymap.patch;patch=1 " SRC_URI_append_ramses = "file://devfs.patch;patch=1 \ file://ramses.patch;patch=1 \ - file://ramses-keyboard.patch;patch=1 \ - file://ramses-touchscreen.patch;patch=1 " -SRC_URI_append_h3600 = "file://ipaq-keyboard.patch;patch=1 " -SRC_URI_append_h3900 = "file://ipaq-keyboard.patch;patch=1 " + file://ramses-touchscreen.patch;patch=1 \ + file://qkeyboard_qws.h \ + file://qkeyboard_qws.cpp " +SRC_URI_append_h3600 = "file://ipaq-keyboard.patch;patch=1 file://ipaq_sound_fix.patch;patch=1 " +SRC_URI_append_h3900 = "file://ipaq-keyboard.patch;patch=1 file://ipaq_sound_fix.patch;patch=1 " S = "${WORKDIR}/qt-${PV}" @@ -94,6 +95,12 @@ export SYSCONF_LFLAGS_ramses = "${LDFLAGS}" export SYSCONF_MOC = "${STAGING_BINDIR}/moc" export SYSCONF_UIC = "${STAGING_BINDIR}/uic" +do_configure_prepend_ramses() { + chmod -R a+w ${S}/src/kernel + cp ${WORKDIR}/qkeyboard_qws.h ${S}/src/kernel + cp ${WORKDIR}/qkeyboard_qws.cpp ${S}/src/kernel +} + do_configure() { for f in ${S}/configs/linux-*-g++-shared; do sed -e 's,-linux-,-linux-uclibc-,g' < $f \ -- cgit v1.2.3