[caribou] Add Swedish keyboard
- From: Benjamin Konrath <bkonrath src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [caribou] Add Swedish keyboard
- Date: Mon, 14 Dec 2009 20:25:47 +0000 (UTC)
commit 9d3d35d62151409659ab00038a2f21b81f7ce249
Author: Mats Lundälv <mats lundalv vgregion se>
Date: Mon Dec 14 15:24:36 2009 -0500
Add Swedish keyboard
src/caribou/keyboards/qwerty_sv.py | 103 ++++++++++++++++++++++++++++++++++++
1 files changed, 103 insertions(+), 0 deletions(-)
---
diff --git a/src/caribou/keyboards/qwerty_sv.py b/src/caribou/keyboards/qwerty_sv.py
new file mode 100644
index 0000000..b60da9a
--- /dev/null
+++ b/src/caribou/keyboards/qwerty_sv.py
@@ -0,0 +1,103 @@
+# -*- coding: UTF-8 -*-
+#
+# Carbou - text entry and UI navigation application
+#
+# Copyright (C) 2009 Adaptive Technology Resource Centre
+# Copyright (C) 2009 Mats Lundälv <mats lundalv vgregion se>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by the
+# Free Software Foundation; either version 2.1 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 Lesser General Public License
+# for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import keysyms
+
+# TODO add horizontal keysize - will be able to specify a mulitplier
+# TODO add key colour
+# TODO add noop keysym
+# TODO add ability switch back to previous layer after x keystrokes
+# TODO ensure keyboard doesn't change size when changing layers
+# TODO finish numbers and punctuation layout
+
+###############################################################################
+# keys with keysyms - use known keysyms from keysyms.py or used hex code
+# format: ("label", keysym)
+###############################################################################
+
+# backspace
+bs = ("â?«", keysyms.backspace)
+# enter
+en = ("â?²", keysyms.enter)
+# space
+sp = ("â?£", keysyms.space)
+# up
+up = ("â??", keysyms.up)
+# down
+dn = ("â??", keysyms.down)
+# left
+le = ("â??", keysyms.left)
+# right
+ri = ("â??", keysyms.right)
+# home
+om = ("â??", keysyms.home)
+# end
+nd = ("â??", keysyms.end)
+# page_up
+pu = ("â??", keysyms.page_up)
+# page_down
+pd = ("â??", keysyms.page_down)
+
+
+###############################################################################
+# keys to switch layers
+# format: ("label", "name of layer to switch to")
+###############################################################################
+
+# shift up
+su = ("â?§", "uppercase")
+# shift down
+sd = ("â?©", "lowercase")
+# number and punctuation
+np = (".?12", "num_punct")
+# letters
+lt = ("abc", "lowercase")
+
+###############################################################################
+# keyboard layouts
+# rules:
+# * key can be a single utf-8 character or a tuple defined above
+# * at least one layout must contain the reserved label "cf" for configuration
+# * layouts must be the same dimensions
+###############################################################################
+
+lowercase = ( ( "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", bs),
+ ( "a", "s", "d", "f", "g", "h", "j", "k", "l", "Ã¥", pu),
+ ( "z", "x", "c", "v", "b", "n", "m", ".", "ö", "ä", en),
+ ( su, np,"cf", sp, le, up, ri, dn, om, nd, pd) )
+
+uppercase = ( ( "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", bs),
+ ( "A", "S", "D", "F", "G", "H", "J", "K", "L", "Ã?", pu),
+ ( "Z", "X", "C", "V", "B", "N", "M", ".", "Ã?", "Ã?", en),
+ ( sd, np,"cf", sp, le, ri, up, dn, om, nd, pd) )
+
+num_punct = ( ( "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", bs),
+ ( "!", "@", "�", "£", "$", "/", "+", "-", "=", "?", "*"),
+ ("\"", "(", ")", "[", "]", "<", up, ">", ",", ".", en),
+ ( "'", lt, sp, sp, ":", le, dn, ri, ";", om, nd) )
+
+
+###############################################################################
+# list of keyboard layouts - the layout in position 0 will be active when the
+# keyboard is first created
+###############################################################################
+
+layouts = ( "lowercase", "uppercase", "num_punct" )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]