summaryrefslogtreecommitdiff
path: root/src/keyboard.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-04-10 20:03:16 +0200
committerFlorent Le Coz <louiz@louiz.org>2011-04-10 20:03:16 +0200
commit5c0cf9a98d32a808d966fddc7ad3578bb3ad4b2a (patch)
tree9430036f3d49b7b095d2a4b588fdbb3aa4a698af /src/keyboard.py
parentf414f341a40c622365f127ef27c7e8f19b6fc47a (diff)
downloadpoezio-5c0cf9a98d32a808d966fddc7ad3578bb3ad4b2a.tar.gz
poezio-5c0cf9a98d32a808d966fddc7ad3578bb3ad4b2a.tar.bz2
poezio-5c0cf9a98d32a808d966fddc7ad3578bb3ad4b2a.tar.xz
poezio-5c0cf9a98d32a808d966fddc7ad3578bb3ad4b2a.zip
fix the colors for Subscribed alerts
Diffstat (limited to 'src/keyboard.py')
-rw-r--r--src/keyboard.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/keyboard.py b/src/keyboard.py
index 4ee620d4..942d9a70 100644
--- a/src/keyboard.py
+++ b/src/keyboard.py
@@ -23,7 +23,7 @@ shortcut, like ^A, M-a or KEY_RESIZE)
import time
-last_char_time = None
+last_timeout = time.time()
def get_next_byte(s):
"""
@@ -45,13 +45,11 @@ def read_char(s):
Read one utf-8 char
see http://en.wikipedia.org/wiki/UTF-8#Description
"""
- # We use a timer to know if we are pasting from the
- # clipboard or not
- # global last_char_time
- # last_char_time = time.time()
+ global last_timeout
s.timeout(1000)
(first, char) = get_next_byte(s)
if first is None and char is None:
+ last_timeout = time.time()
return None
if not isinstance(first, int): # Keyboard special, like KEY_HOME etc
return char