/[papo]/gnue/forms/src/GFKeyMapper.py
ViewVC logotype

Diff of /gnue/forms/src/GFKeyMapper.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by styxman, Thu Nov 14 22:16:53 2002 UTC revision 1.4.2.1 by anthonyl, Tue Mar 4 22:18:22 2003 UTC
# Line 16  Line 16 
16  # write to the Free Software Foundation, Inc., 59 Temple Place  # write to the Free Software Foundation, Inc., 59 Temple Place
17  # - Suite 330, Boston, MA 02111-1307, USA.  # - Suite 330, Boston, MA 02111-1307, USA.
18  #  #
19  # Copyright 2002 Free Software Foundation  # Copyright 2002-2003 Free Software Foundation
20  #  #
21  # FILE:  # FILE:
22  # GFKeyMapper.py  # GFKeyMapper.py
# Line 78  class BaseKeyMapper: Line 78  class BaseKeyMapper:
78    #    #
79    def loadUserKeyMap(self, dict):    def loadUserKeyMap(self, dict):
80      usermap = {}      usermap = {}
81    
82      for event in dict.keys():      for event in dict.keys():
83        val = string.upper(dict[event])        val = string.upper(dict[event])
84    
# Line 95  class BaseKeyMapper: Line 96  class BaseKeyMapper:
96        meta = 0        meta = 0
97        ctrl = 0        ctrl = 0
98    
99    
100        for key in keys:        for key in keys:
101          if key in ('CTRL','CONTROL'):          if key in ('CTRL','CONTROL'):
102            ctrl = 1            ctrl = 1
# Line 102  class BaseKeyMapper: Line 104  class BaseKeyMapper:
104            meta = 0            meta = 0
105          elif key in ('SHFT','SHIFT'):          elif key in ('SHFT','SHIFT'):
106            shifted = 0            shifted = 0
107          elif vk.__dict__.has_key(key):          elif _VirtualKeys.__dict__.has_key(key):
108            key = vk.__dict__[key]            base = _VirtualKeys.__dict__[key]
109          elif len(key) == 1:          elif len(key) == 1:
110            # TODO: This might not be necessary            # TODO: This might not be necessary
111            key = ord(key)            key = ord(key)
# Line 233  class _VirtualKeys: Line 235  class _VirtualKeys:
235  #  #
236  vk = _VirtualKeys()  vk = _VirtualKeys()
237    
   
238  #  #
239  # Given a keycode value (e.g., -999), return  # Given a keycode value (e.g., -999), return
240  # the text representation as a string (e.g., 'F1')  # the text representation as a string (e.g., 'F1')

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.4.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26