From: NeilBrown Date: Thu, 24 Jan 2013 23:19:47 +0000 (+1100) Subject: tapboard - make TAB and ESC more assessible. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=896822fd4454186853d8fde335c72957dfc15ee2;p=plato.git tapboard - make TAB and ESC more assessible. They are just drags on 'space' and 'return'. Still more work to do here. Signed-off-by: NeilBrown --- diff --git a/lib/tapboard.py b/lib/tapboard.py index 530caa3..337587b 100644 --- a/lib/tapboard.py +++ b/lib/tapboard.py @@ -45,6 +45,16 @@ # upper/lower or numeric/punc # and bottom row maybe should become: # lock control alt ... something. +# +# Need: +# P-up Pdown Arrows +# control alt +# +# ESC - enter-drag +# TAB - space-drag +# ctrl - Shift-drag +# alt - num-drag +# import gtk, pango, gobject @@ -57,8 +67,8 @@ keymap['lower'] = [ ] keymap['lower-xtra'] = [ ['1','2','3','4','5','6','7','8','9','0'], - [ ' ',' ',' ',' ',' ',' ',' ',' ',' '], - ['$',' ',' ',' ',' ',' ',' ',' ','!','?'] + [ '/',' ',' ',' ',' ',' ',' ',' ',' '], + ['$','*',' ',' ',' ',' ','<','>','!','?'] ] keymap['lower-shift'] = [ ['Q','W','E','R','T','Y','U','I','O','P'], @@ -79,7 +89,7 @@ keymap['number'] = [ keymap['number-shift'] = [ ['!','@','#','$','%','^','&','*','(',')'], [ '~','`','_',',','.','<','>','\'','"'], - ['\\','|','+','=','_','-','Tab','Escape','Delete','Home'] + ['\\','|','+','=','_','-','Home','End','Insert','Delete'] ] class TapBoard(gtk.VBox): @@ -152,9 +162,9 @@ class TapBoard(gtk.VBox): b = self.add_button('Num', self.nextmode, True, h, fd) self.modebutton = b - b = self.add_button('SPC', self.tap, (-1,' '), h, fd) - b = self.add_button('Entr', self.tap, (-1,'\n'), h, fd) - b = self.add_button(gtk.STOCK_UNDO, self.tap, (-1,'\b'), h) + b = self.add_button('SPC', self.tap, (-1,(' ','\t')), h, fd) + b = self.add_button('Entr', self.tap, (-1,('\n','\e')), h, fd) + b = self.add_button(gtk.STOCK_UNDO, self.tap, (-1,('\b','up')), h) # mode can be 'lower' or 'number' # shift can be '' or '-shift' @@ -286,7 +296,10 @@ class TapBoard(gtk.VBox): else: m = self.mode + '-shift' if row < 0 : - sym = col + if moved: + sym = col[1] + else: + sym = col[0] else: sym = keymap[m][row][col] self.emit('key', sym)