Skip to content

Commit 633804b

Browse files
committed
Change keyborad module to keyboard in PyPI for MU editor
1 parent a570f4c commit 633804b

20 files changed

+6028
-148
lines changed

neopia/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
from neopia.scanner import Scanner
2323
from neopia.mode import Mode
24-
from neopia.keyboard import Keyboard
24+
from neopia._keyboard import Keyboard
2525
from neopia.runner import Runner
2626
from neopia.model import DeviceType
2727
from neopia.model import DataType

neopia/_keyboard.py

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Part of the RoboticsWare project - https://roboticsware.uz
2+
# Copyright (C) 2022 RoboticsWare ([email protected])
3+
#
4+
# This library is free software; you can redistribute it and/or
5+
# modify it under the terms of the GNU Lesser General Public
6+
# License as published by the Free Software Foundation; either
7+
# version 2.1 of the License, or (at your option) any later version.
8+
#
9+
# This library is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
# Lesser General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU Lesser General
15+
# Public License along with this library; if not, write to the
16+
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
17+
# Boston, MA 02111-1307 USA
18+
19+
import os
20+
from . import keyboard
21+
22+
23+
class Keyboard(object):
24+
BACKSPACE = 'delete'
25+
TAB = 'tab'
26+
ENTER = 'enter'
27+
F1 = 'f1'
28+
F2 = 'f2'
29+
F3 = 'f3'
30+
F4 = 'f4'
31+
F5 = 'f5'
32+
F6 = 'f6'
33+
F7 = 'f7'
34+
F8 = 'f8'
35+
F9 = 'f9'
36+
F10 = 'f10'
37+
F11 = 'f11'
38+
F12 = 'f12'
39+
40+
HOME = 'home'
41+
UP = 'up'
42+
PAGE_UP = 'page up'
43+
LEFT = 'left'
44+
RIGHT = 'right'
45+
END = 'end'
46+
DOWN = 'down'
47+
PAGE_DOWN = 'page down'
48+
SPACE = 'space'
49+
DELETE = 'forward delete'
50+
51+
@staticmethod
52+
def read():
53+
event = keyboard.read_event()
54+
if event.event_type == keyboard.KEY_DOWN:
55+
return event.name
56+

neopia/keyboard.py

Lines changed: 0 additions & 144 deletions
This file was deleted.

0 commit comments

Comments
 (0)