[Bugs] #3233 UNSP: Typing Turtle does not recognize different keyboards
Sugar Labs Bugs
bugtracker-noreply at sugarlabs.org
Sat Nov 19 19:03:28 EST 2011
#3233: Typing Turtle does not recognize different keyboards
------------------------------------------+---------------------------------
Reporter: godiard | Owner: manuq
Type: defect | Status: new
Priority: Unspecified by Maintainer | Milestone: Unspecified by Release Team
Component: TypingTurtle | Version: Unspecified
Severity: Unspecified | Keywords:
Distribution: Unspecified | Status_field: Unconfirmed
------------------------------------------+---------------------------------
Comment(by manuq):
Part I, reloaded:
{{{
def _is_olpcm_model():
"""Check via setxkbmap if the keyboard model is olpcm.
Keyboard model code is 'olpcm' for non-membrane, mechanical
keyboard, and 'olpc' for membrane keyboard.
"""
code = None
p = subprocess.Popen(["setxkbmap", "-query"], stdout=subprocess.PIPE)
out, err = p.communicate()
for line in out.splitlines():
if line.startswith('model:'):
code = line.split()[1]
return code == 'olpcm'
}}}
Part II on the way.
--
Ticket URL: <http://bugs.sugarlabs.org/ticket/3233#comment:8>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system
More information about the Bugs
mailing list