Re: [Sugar-devel] #1686 UNSP: Accessibility - virtual keyboard
hi, The virtualkeyboard displays the buttons of spanish keyboard. For example, show Ñ. We have a virtualkeyboard activity: https://desarrollo.ceibal.edu.uy/projects/tecladoenpantalla/files esteban. 2010/5/26 James Cameron qu...@laptop.org On Wed, May 26, 2010 at 10:57:55AM -0400, Michael Stone wrote: For this sole strategic reason, I think we need to consider accepting well-written patches that come to us in Spanish or in English. I agree. I don't think language, culture of origin, or degree of whitespace should prevent acceptance. They might delay or hinder review though, and so use of English should be a recommendation and not a requirement. -- James Cameron http://quozl.linux.org.au/ -- Esteban Arias Plan Ceibal - Área Técnica Avda. Italia 6201 Montevideo - Uruguay. Tel.: 601.57.73 Interno 2228 E-mail : ear...@plan.ceibal.edu.uy ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] #1686 UNSP: Accessibility - virtual keyboard
Fantastic, thanks! Good work. On Thu, May 27, 2010 at 10:10:02AM -0300, Esteban Arias wrote: hi, The virtualkeyboard displays the buttons of spanish keyboard. For example, show ?. We have a virtualkeyboard activity: https://desarrollo.ceibal.edu.uy/projects/ tecladoenpantalla/files esteban. 2010/5/26 James Cameron qu...@laptop.org On Wed, May 26, 2010 at 10:57:55AM -0400, Michael Stone wrote: For this sole strategic reason, I think we need to consider accepting well-written patches that come to us in Spanish or in English. I agree. I don't think language, culture of origin, or degree of whitespace should prevent acceptance. They might delay or hinder review though, and so use of English should be a recommendation and not a requirement. -- James Cameron http://quozl.linux.org.au/ -- Esteban Arias Plan Ceibal - ?rea T?cnica Avda. Italia 6201 Montevideo - Uruguay. Tel.: 601.57.73 Interno 2228 E-mail : ear...@plan.ceibal.edu.uy -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] #1686 UNSP: Accessibility - virtual keyboard
El Sun, 23-05-2010 a las 15:46 -0400, Michael Stone escribió: First observation: the patch is GPLv3+, yet Sugar is usually distributed under GPLv2+. Yes? For the record, I would favor of upgrading to the GPLv3, but only if it doesn't result in a huge licensing flamewar... it doesn't matter that much... Final remark: this patch names variables, methods, and classes in Spanish. Anyone troubled by this? I think we should consistently use English everywhere, so developers don't have to learn 6 different languages to read a piece of Sugar code. -- // Bernie Innocenti - http://codewiz.org/ \X/ Sugar Labs - http://sugarlabs.org/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] #1686 UNSP: Accessibility - virtual keyboard
On Wednesday 26 May 2010 06:26:52 pm James Cameron wrote: On Wed, May 26, 2010 at 10:57:55AM -0400, Michael Stone wrote: For this sole strategic reason, I think we need to consider accepting well-written patches that come to us in Spanish or in English. I agree. I don't think language, culture of origin, or degree of whitespace should prevent acceptance. They might delay or hinder review though, and so use of English should be a recommendation and not a requirement. Lets also think about translation. I would like to be disproved but I think English is the most popular secondary language in the world, so gettexted strings should always be in English. I don't believe this completely invalidates the arguments for accepting code in other languages, but at least the gap between writing some things in English and writing everything in English is smaller. It is also not currently possible to write a useful patch without reading a lot of existing code (in English), so I don't think whoever does it would be unable to write it in (at least bad) English. I don't think having a rigid policy either way, either accepting only patches in English or accepting any patch, is a good idea. We don't want to discourage contributors that don't speak English, but neither do we want to have lazy contributors forgetting about the maintainability of their code. -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- -Andrés signature.asc Description: This is a digitally signed message part. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] #1686 UNSP: Accessibility - virtual keyboard
On Sun, May 23, 2010 at 21:46, Michael Stone mich...@laptop.org wrote: On Sun, May 23, 2010 at 03:18:47PM -0400, Michael Stone wrote: On Wed, May 19, 2010 at 03:10:52PM +0200, Tomeu Vizoso wrote: On Sat, May 15, 2010 at 23:48, Sugar Labs Bugs bugtracker-nore...@sugarlabs.org wrote: #1686: Accessibility - virtual keyboard --+- Reporter: earias | Owner: tomeu Type: defect | Status: new Priority: Unspecified by Maintainer | Milestone: Unspecified by Release Team Component: sugar | Version: Unspecified Severity: Unspecified | Keywords: r? Distribution: Unspecified | Status_field: Unconfirmed --+- Changes (by bernie): * keywords: = r? Comment: Can someone please review this patch? Any volunteers in the mailing list? I'll offer a couple of observations. First, though, I'll reproduce the patch inline so that I can reply inline and so that everyone can take a good look at it. Michael From 6781e1bec2c387a740aafe0943c0aa9250482e1a Mon Sep 17 00:00:00 2001 From: Esteban ear...@localhost.localdomain Date: Mon, 25 Jan 2010 14:52:17 -0200 Subject: [PATCH] virtualkeyboard --- extensions/globalkey/Makefile.am | 4 +- extensions/globalkey/virtualkeyboard.py | 12 + src/jarabe/model/Makefile.am | 3 +- src/jarabe/model/virtualkeyboard.py | 184 +++ src/jarabe/view/Makefile.am | 3 +- src/jarabe/view/virtualkeyboard.py | 865 +++ 6 files changed, 1068 insertions(+), 3 deletions(-) create mode 100644 extensions/globalkey/virtualkeyboard.py create mode 100755 src/jarabe/model/virtualkeyboard.py create mode 100755 src/jarabe/view/virtualkeyboard.py diff --git a/extensions/globalkey/Makefile.am b/extensions/globalkey/Makefile.am index 69afac2..dff13fb 100644 --- a/extensions/globalkey/Makefile.am +++ b/extensions/globalkey/Makefile.am @@ -3,4 +3,6 @@ sugardir = $(pkgdatadir)/extensions/globalkey sugar_PYTHON = \ __init__.py \ screenshot.py \ - viewsource.py + viewsource.py \ + virtualkeyboard.py + diff --git a/extensions/globalkey/virtualkeyboard.py b/extensions/globalkey/virtualkeyboard.py new file mode 100644 index 000..9291142 --- /dev/null +++ b/extensions/globalkey/virtualkeyboard.py @@ -0,0 +1,12 @@ +import os +import gtk +import logging + +from jarabe.model import shell +import jarabe.view.virtualkeyboard + +BOUND_KEYS = ['altk'] + +def handle_key_press(key): + logging.debug('load virtual keyboard') + jarabe.view.virtualkeyboard.Teclado() diff --git a/src/jarabe/model/Makefile.am b/src/jarabe/model/Makefile.am index 18d44da..ae3dce9 100644 --- a/src/jarabe/model/Makefile.am +++ b/src/jarabe/model/Makefile.am @@ -14,4 +14,5 @@ sugar_PYTHON = \ shell.py \ screen.py \ session.py \ - sound.py + sound.py \ + virtualkeyboard.py diff --git a/src/jarabe/model/virtualkeyboard.py b/src/jarabe/model/virtualkeyboard.py new file mode 100755 index 000..6867f10 --- /dev/null +++ b/src/jarabe/model/virtualkeyboard.py @@ -0,0 +1,184 @@ +#!/usr/bin/env python +# -*- coding: iso-8859-1 -*- +# virtualkeyboard +# Copyright (C) 2009 Plan Ceibal +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. First observation: the patch is GPLv3+, yet Sugar is usually distributed under GPLv2+. Yes? +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# Contact information: comuni...@plan.ceibal.edu.uy +# Plan Ceibal http://www.ceibal.edu.uy + +import pygtk +pygtk.require('2.0') +import gtk +import sys, os +import time +import pango +import Xlib.display +import Xlib.X +import Xlib.XK +import Xlib.protocol.event Next observation: the patch introduces a dependency on python-xlib, which I don't think we've depended on before. This doesn't seem hard to support but it does need to be more clearly explained. + +class Teclado: + special_X_keysyms = { + ' ' : space, + '\t' :
Re: [Sugar-devel] #1686 UNSP: Accessibility - virtual keyboard
On 26.05.2010, at 11:01, Tomeu Vizoso wrote: On Sun, May 23, 2010 at 21:46, Michael Stone mich...@laptop.org wrote: Final remark: this patch names variables, methods, and classes in Spanish. Anyone troubled by this? (I ask because, while it's fine with me personally, I don't think I know a consensus opinion on the subject.) I'm not so happy about it, I think it raises considerably the effort needed to read the code, even for spanish speakers like me. Regards, Tomeu IMHO the whole code base should be in English. This is the language we use for collaborating. - Bert - (native German speaker) ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] #1686 UNSP: Accessibility - virtual keyboard
On Wed, May 26, 2010 at 11:14:37AM +0200, Bert Freudenberg wrote: IMHO the whole code base should be in English. This is the language we use for collaborating. I agree. (Though personally I find unusual object names easy to deal with because I'm from a time when names had to be so abbreviated as to be senseless.) -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] #1686 UNSP: Accessibility - virtual keyboard
On Wed, May 26, 2010 at 11:14:37AM +0200, Bert Freudenberg wrote: IMHO the whole code base should be in English. This is the language we use for collaborating. +1 FWIW Martin pgpyCNHg72HXH.pgp Description: PGP signature ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] #1686 UNSP: Accessibility - virtual keyboard
Tomeu, Bert, James, Martin D., and Michael wrote: T: Thanks a lot for lending a hand here. My pleasure, and thanks for mentioning the ticket. M: Final remark: this patch names variables, methods, and classes in Spanish. Anyone troubled by this? (I ask because, while it's fine with me personally, I don't think I know consensus opinion on the subject.) T: I'm not so happy about it, I think it raises considerably the effort needed to read the code, even for spanish speakers like me. B,J,MD: IMHO the whole code base should be in English. This is the language we use for collaborating. You and I certainly collaborate in English but the folks dealing with Sugar on a daily basis in Uruguay, Peru, and Paraguay largely do not, at least in their daily dealings among themselves. For this sole strategic reason, I think we need to consider accepting well-written patches that come to us in Spanish or in English. The main cost of pursuing this course is that patches written in Spanish are somewhat harder for some prominent Sugar contributors to read than are patches written in English. Additionally, having a mixed-language codebase may be off-putting to some potential contributors. On the other hand, does it not seem likely that by welcoming patches written in the first and most common language of our largest groups of users, we would receive more patches, thereby gaining more contributors, some of whom might grow to become integral members of our community? (Finally, if we don't receive many patches, then what will be the loss for having tried? At most, we will have a small number of patches to translate from Spanish to English. Not a big deal, right?) Regards, Michael ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] #1686 UNSP: Accessibility - virtual keyboard
First of all, thanks Esteban for the great work! I hope we can spin a new build soon and give it a try. On the other hand, even though I also come from a Spanish speaking country, I'd say having all the code in English (the defacto lingua franca for code) would be best on the long term. It's an extra effort (and I volunteer to help with translations if Esteban is short on time) but I think it is important to maintain consistency in variable names, methods and comments. Cheers, Raúl P.S.: we try to produce all of our code (in git.paraguayeduca.org) under the same rules (all English) so we can share it among deployments.. we hope it results useful for someone some day! :) On Wed, 2010-05-26 at 10:57 -0400, Michael Stone wrote: Tomeu, Bert, James, Martin D., and Michael wrote: T: Thanks a lot for lending a hand here. My pleasure, and thanks for mentioning the ticket. M: Final remark: this patch names variables, methods, and classes in Spanish. Anyone troubled by this? (I ask because, while it's fine with me personally, I don't think I know consensus opinion on the subject.) T: I'm not so happy about it, I think it raises considerably the effort needed to read the code, even for spanish speakers like me. B,J,MD: IMHO the whole code base should be in English. This is the language we use for collaborating. You and I certainly collaborate in English but the folks dealing with Sugar on a daily basis in Uruguay, Peru, and Paraguay largely do not, at least in their daily dealings among themselves. For this sole strategic reason, I think we need to consider accepting well-written patches that come to us in Spanish or in English. The main cost of pursuing this course is that patches written in Spanish are somewhat harder for some prominent Sugar contributors to read than are patches written in English. Additionally, having a mixed-language codebase may be off-putting to some potential contributors. On the other hand, does it not seem likely that by welcoming patches written in the first and most common language of our largest groups of users, we would receive more patches, thereby gaining more contributors, some of whom might grow to become integral members of our community? (Finally, if we don't receive many patches, then what will be the loss for having tried? At most, we will have a small number of patches to translate from Spanish to English. Not a big deal, right?) Regards, Michael ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] #1686 UNSP: Accessibility - virtual keyboard
First of all, thanks Esteban for the great work! I hope we can spin a new build soon and give it a try. Thanks, that would indeed be helpful. Meanwhile, something else that you might spin around in your head while you make the build is how do we make a virtual keyboard that works for all the languages we have keyboards for? (and/or, is there another program that already does this that could be integrated with Sugar?) On the other hand, even though I also come from a Spanish speaking country, I'd say having all the code in English (the defacto lingua franca for code) would be best on the long term. I'm not yet convinced, though I certainly appreciate your feedback. Here are three prominent memories that still sway my opinion: 1) I read multi-language files and communications nearly every day so, for me, they're already a fact of life. For example, every time I read my email, every time I write a Makefile, and every time I write a web-app (in SML, HTML, CSS, JS, and SVG) I'm facing the same general problem posed by Spanish-flavored vs. English-flavored patches. 2) When OLPC sent me to visit LATU and Ceibal Jam, I was struck by the large quantities of interesting code written by both of those organizations... in Spanish. I know that I want both that code and the people writing it to be participating more directly in the daily development of Sugar. My best idea for how to achieve this goal is to try to meet them halfway. 3) When I (briefly) taught English in a public school in Dharamsala, India, I found that I could not function effectively without learning enough Hindi to establish a working pidgin communications channel. This channel mattered for two reasons: first, because it served as a control plane for collaboration and second, because it generated enough mutual respect and interest to sustain collaboration. I feel both these needs here too. It's an extra effort (and I volunteer to help with translations if Esteban is short on time) but I think it is important to maintain consistency in variable names, methods and comments. I agree that it's important be (sufficiently) consistent. However, I also believe that an acceptable degree of consistency can be found in a codebase that contains both Spanish and English text. Instead, the kind of inconsistency that I am most concerned with is inconsistency in control and data flow idioms. Regards, Michael P.S.: we try to produce all of our code (in git.paraguayeduca.org) under the same rules (all English) so we can share it among deployments.. we hope it results useful for someone some day! :) P.S. - Thanks for the links and for the thought-provoking discussion! ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] #1686 UNSP: Accessibility - virtual keyboard
On Wed, May 26, 2010 at 10:57:55AM -0400, Michael Stone wrote: Additionally, having a mixed-language codebase may be off-putting to some potential contributors. It's also going to decrease consistency[1] and increase the bar to contribution to (ad absurdum) working knowledge of each language of each patch contributor. [D]oes it not seem likely that by welcoming patches written in the first and most common language of our largest groups of users, we would receive more patches[?] It doesn't seem likely since an understanding of existing English code would seem a prerequisite for any patches to exist in the first place. (Finally, if we don't receive many patches, then what will be the loss for having tried? At most, we will have a small number of patches to translate from Spanish to English. Not a big deal, right?) Oh wait, are you supporting *reviewing* patches in any language but *committing* only translated patches? That seems much less consistency-hostile. Regards, Michael Martin 1. I don't think the second section of PEP-8 diminishes this objection pgpwfkU67ptld.pgp Description: PGP signature ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] #1686 UNSP: Accessibility - virtual keyboard
On Wed, May 26, 2010 at 10:57:55AM -0400, Michael Stone wrote: For this sole strategic reason, I think we need to consider accepting well-written patches that come to us in Spanish or in English. I agree. I don't think language, culture of origin, or degree of whitespace should prevent acceptance. They might delay or hinder review though, and so use of English should be a recommendation and not a requirement. -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] #1686 UNSP: Accessibility - virtual keyboard
On Wed, May 19, 2010 at 03:10:52PM +0200, Tomeu Vizoso wrote: On Sat, May 15, 2010 at 23:48, Sugar Labs Bugs bugtracker-nore...@sugarlabs.org wrote: #1686: Accessibility - virtual keyboard --+- Reporter: earias | Owner: tomeu Type: defect | Status: new Priority: Unspecified by Maintainer | Milestone: Unspecified by Release Team Component: sugar | Version: Unspecified Severity: Unspecified | Keywords: r? Distribution: Unspecified | Status_field: Unconfirmed --+- Changes (by bernie): * keywords: = r? Comment: Can someone please review this patch? Any volunteers in the mailing list? I'll offer a couple of observations. First, though, I'll reproduce the patch inline so that I can reply inline and so that everyone can take a good look at it. Michael From 6781e1bec2c387a740aafe0943c0aa9250482e1a Mon Sep 17 00:00:00 2001 From: Esteban ear...@localhost.localdomain Date: Mon, 25 Jan 2010 14:52:17 -0200 Subject: [PATCH] virtualkeyboard --- extensions/globalkey/Makefile.am|4 +- extensions/globalkey/virtualkeyboard.py | 12 + src/jarabe/model/Makefile.am|3 +- src/jarabe/model/virtualkeyboard.py | 184 +++ src/jarabe/view/Makefile.am |3 +- src/jarabe/view/virtualkeyboard.py | 865 +++ 6 files changed, 1068 insertions(+), 3 deletions(-) create mode 100644 extensions/globalkey/virtualkeyboard.py create mode 100755 src/jarabe/model/virtualkeyboard.py create mode 100755 src/jarabe/view/virtualkeyboard.py diff --git a/extensions/globalkey/Makefile.am b/extensions/globalkey/Makefile.am index 69afac2..dff13fb 100644 --- a/extensions/globalkey/Makefile.am +++ b/extensions/globalkey/Makefile.am @@ -3,4 +3,6 @@ sugardir = $(pkgdatadir)/extensions/globalkey sugar_PYTHON =\ __init__.py \ screenshot.py \ - viewsource.py + viewsource.py \ + virtualkeyboard.py + diff --git a/extensions/globalkey/virtualkeyboard.py b/extensions/globalkey/virtualkeyboard.py new file mode 100644 index 000..9291142 --- /dev/null +++ b/extensions/globalkey/virtualkeyboard.py @@ -0,0 +1,12 @@ +import os +import gtk +import logging + +from jarabe.model import shell +import jarabe.view.virtualkeyboard + +BOUND_KEYS = ['altk'] + +def handle_key_press(key): + logging.debug('load virtual keyboard') + jarabe.view.virtualkeyboard.Teclado() diff --git a/src/jarabe/model/Makefile.am b/src/jarabe/model/Makefile.am index 18d44da..ae3dce9 100644 --- a/src/jarabe/model/Makefile.am +++ b/src/jarabe/model/Makefile.am @@ -14,4 +14,5 @@ sugar_PYTHON =\ shell.py\ screen.py \ session.py\ - sound.py + sound.py\ + virtualkeyboard.py diff --git a/src/jarabe/model/virtualkeyboard.py b/src/jarabe/model/virtualkeyboard.py new file mode 100755 index 000..6867f10 --- /dev/null +++ b/src/jarabe/model/virtualkeyboard.py @@ -0,0 +1,184 @@ +#!/usr/bin/env python +# -*- coding: iso-8859-1 -*- +# virtualkeyboard +# Copyright (C) 2009 Plan Ceibal +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# Contact information: comuni...@plan.ceibal.edu.uy +# Plan Ceibal http://www.ceibal.edu.uy + +import pygtk +pygtk.require('2.0') +import gtk +import sys, os +import time +import pango +import Xlib.display +import Xlib.X +import Xlib.XK +import Xlib.protocol.event + +class Teclado: +special_X_keysyms = { + ' ' : space, + '\t' : Tab, + '\n' : Return, + '\r' : BackSpace, + '\e' : Escape, + '!' : exclam, + '#' : numbersign, + '%' : percent, + '$' : dollar, + '' : ampersand, + '' : quotedbl, + '\'' : apostrophe, + '(' : parenleft, + ')' : parenright, + '*' : asterisk, + '=' : equal, + '+' : plus, + ',' : comma, + '-' : minus, + '.' : period, + '/' : slash, +
Re: [Sugar-devel] #1686 UNSP: Accessibility - virtual keyboard
On Sun, May 23, 2010 at 03:18:47PM -0400, Michael Stone wrote: On Wed, May 19, 2010 at 03:10:52PM +0200, Tomeu Vizoso wrote: On Sat, May 15, 2010 at 23:48, Sugar Labs Bugs bugtracker-nore...@sugarlabs.org wrote: #1686: Accessibility - virtual keyboard --+- Reporter: earias | Owner: tomeu Type: defect | Status: new Priority: Unspecified by Maintainer | Milestone: Unspecified by Release Team Component: sugar | Version: Unspecified Severity: Unspecified | Keywords: r? Distribution: Unspecified | Status_field: Unconfirmed --+- Changes (by bernie): * keywords: = r? Comment: Can someone please review this patch? Any volunteers in the mailing list? I'll offer a couple of observations. First, though, I'll reproduce the patch inline so that I can reply inline and so that everyone can take a good look at it. Michael From 6781e1bec2c387a740aafe0943c0aa9250482e1a Mon Sep 17 00:00:00 2001 From: Esteban ear...@localhost.localdomain Date: Mon, 25 Jan 2010 14:52:17 -0200 Subject: [PATCH] virtualkeyboard --- extensions/globalkey/Makefile.am|4 +- extensions/globalkey/virtualkeyboard.py | 12 + src/jarabe/model/Makefile.am|3 +- src/jarabe/model/virtualkeyboard.py | 184 +++ src/jarabe/view/Makefile.am |3 +- src/jarabe/view/virtualkeyboard.py | 865 +++ 6 files changed, 1068 insertions(+), 3 deletions(-) create mode 100644 extensions/globalkey/virtualkeyboard.py create mode 100755 src/jarabe/model/virtualkeyboard.py create mode 100755 src/jarabe/view/virtualkeyboard.py diff --git a/extensions/globalkey/Makefile.am b/extensions/globalkey/Makefile.am index 69afac2..dff13fb 100644 --- a/extensions/globalkey/Makefile.am +++ b/extensions/globalkey/Makefile.am @@ -3,4 +3,6 @@ sugardir = $(pkgdatadir)/extensions/globalkey sugar_PYTHON = \ __init__.py \ screenshot.py \ - viewsource.py + viewsource.py \ + virtualkeyboard.py + diff --git a/extensions/globalkey/virtualkeyboard.py b/extensions/globalkey/virtualkeyboard.py new file mode 100644 index 000..9291142 --- /dev/null +++ b/extensions/globalkey/virtualkeyboard.py @@ -0,0 +1,12 @@ +import os +import gtk +import logging + +from jarabe.model import shell +import jarabe.view.virtualkeyboard + +BOUND_KEYS = ['altk'] + +def handle_key_press(key): + logging.debug('load virtual keyboard') + jarabe.view.virtualkeyboard.Teclado() diff --git a/src/jarabe/model/Makefile.am b/src/jarabe/model/Makefile.am index 18d44da..ae3dce9 100644 --- a/src/jarabe/model/Makefile.am +++ b/src/jarabe/model/Makefile.am @@ -14,4 +14,5 @@ sugar_PYTHON = \ shell.py\ screen.py \ session.py \ - sound.py + sound.py\ + virtualkeyboard.py diff --git a/src/jarabe/model/virtualkeyboard.py b/src/jarabe/model/virtualkeyboard.py new file mode 100755 index 000..6867f10 --- /dev/null +++ b/src/jarabe/model/virtualkeyboard.py @@ -0,0 +1,184 @@ +#!/usr/bin/env python +# -*- coding: iso-8859-1 -*- +# virtualkeyboard +# Copyright (C) 2009 Plan Ceibal +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. First observation: the patch is GPLv3+, yet Sugar is usually distributed under GPLv2+. Yes? +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# Contact information: comuni...@plan.ceibal.edu.uy +# Plan Ceibal http://www.ceibal.edu.uy + +import pygtk +pygtk.require('2.0') +import gtk +import sys, os +import time +import pango +import Xlib.display +import Xlib.X +import Xlib.XK +import Xlib.protocol.event Next observation: the patch introduces a dependency on python-xlib, which I don't think we've depended on before. This doesn't seem hard to support but it does need to be more clearly explained. + +class Teclado: +special_X_keysyms = { + ' ' : space, + '\t' : Tab, + '\n' : Return, + '\r' : BackSpace, + '\e' : Escape, + '!' : exclam, +
Re: [Sugar-devel] #1686 UNSP: Accessibility - virtual keyboard
On Sat, May 15, 2010 at 23:48, Sugar Labs Bugs bugtracker-nore...@sugarlabs.org wrote: #1686: Accessibility - virtual keyboard --+- Reporter: earias | Owner: tomeu Type: defect | Status: new Priority: Unspecified by Maintainer | Milestone: Unspecified by Release Team Component: sugar | Version: Unspecified Severity: Unspecified | Keywords: r? Distribution: Unspecified | Status_field: Unconfirmed --+- Changes (by bernie): * keywords: = r? Comment: Can someone please review this patch? Any volunteers in the mailing list? Thanks, Tomeu -- Ticket URL: http://bugs.sugarlabs.org/ticket/1686#comment:1 Sugar Labs http://sugarlabs.org/ Sugar Labs bug tracking system ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel