<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
TUIO2HID
(c) 2012 <NAME>
This program translates TUIO events from reacTIVision
into keyboard events.
Change the file "mapping.txt" to change the mapping
between fiducial IDs and Keys.
"""

import keys
import keydict
from time import sleep
import tuio

def sendKeyEvent(s,updown):
        "Send a KeyBoard event"
        if s in keydict.CODES:
                code = keydict.CODES[s]
        elif len(s) == 1:
                code = ord(s.upper())
        else:
                print "ignoring unknown key: "+s
                return
        keys.send_input( keys.make_input_objects( ((code,updown),)) )

def pushK(s):<commit_msg>allow lower case in key codes<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
TUIO2HID
(c) 2012 <NAME>
This program translates TUIO events from reacTIVision
into keyboard events.
Change the file "mapping.txt" to change the mapping
between fiducial IDs and Keys.
"""

import keys
import keydict
from time import sleep
import tuio

def sendKeyEvent(s,updown):
        "Send a KeyBoard event"
        if s in keydict.CODES:
                code = keydict.CODES[s.upper()]
        elif len(s) == 1:
                code = ord(s.upper())
        else:
                print "ignoring unknown key: "+s
                return
        keys.send_input( keys.make_input_objects( ((code,updown),)) )

def pushK(s):
{'fraction_non_alphanumeric': 0.1082036775106082, 'fraction_numerical': 0.009900990099009901, 'mean_word_length': 2.442822384428224, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3565244', 'n_tokens_mistral': 468, 'n_tokens_neox': 442, 'n_words': 144}