Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
279 changes: 279 additions & 0 deletions adafruit_hid/de_de.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,279 @@
# SPDX-FileCopyrightText: 2020, Bitboy85
#
# SPDX-License-Identifier: MIT

"""
`adafruit_hid.de_de`
=======================================================
# The index of the array represents the 8-bit ascii code.
# The tupple of each index represents the keys needed to be pressed for this ascii character
# For example: on german layouts @ is written by ALT_R(AltGr) + q
# keycodes of 0x00 are ignored, those represent non-printable chars or characters
# which cannot be entered by key combination

* Author(s): Bitboy85
"""
#pylint: disable=duplicate-code


from keycode import Keycode

asciiToKeycode = [
(0x00), # NUL
(0x00), # SOH
(0x00), # STX
(0x00), # ETX
(0x00), # EOT
(0x00), # ENQ
(0x00), # ACK
(0x00), # BEL
(0x2a), # BS Backspace
(0x2b), # TAB Tab
(0x28), # LF Enter
(0x00), # VT
(0x00), # FF
(0x00), # CR
(0x00), # SO
(0x00), # SI
(0x00), # DEL
(0x00), # DC1
(0x00), # DC2
(0x00), # DC3
(0x00), # DC4
(0x00), # NAK
(0x00), # SYN
(0x00), # ETB
(0x00), # CAN
(0x00), # EM
(0x00), # SUB
(0x00), # ESC
(0x00), # FS
(0x00), # GS
(0x00), # RS
(0x00), # US

(0x2c), # SPACE
(0x1e, Keycode.LEFT_SHIFT), # !
(0x1f, Keycode.LEFT_SHIFT), # "
(0x31), # #
(0x21, Keycode.LEFT_SHIFT), # $
(0x22, Keycode.LEFT_SHIFT), # %
(0x23, Keycode.LEFT_SHIFT), # &
(0x31, Keycode.LEFT_SHIFT), # '
(0x25, Keycode.LEFT_SHIFT), # (
(0x26, Keycode.LEFT_SHIFT), # )
(0x30, Keycode.LEFT_SHIFT), # *
(0x30), # +
(0x36), # ,
(0x38), # -
(0x37), # .
(0x24, Keycode.LEFT_SHIFT), # /
(0x27), # 0
(0x1e), # 1
(0x1f), # 2
(0x20), # 3
(0x21), # 4
(0x22), # 5
(0x23), # 6
(0x24), # 7
(0x25), # 8
(0x26), # 9
(0x37, Keycode.LEFT_SHIFT), # :
(0x36, Keycode.LEFT_SHIFT), # ;
(0x64), # <
(0x27, Keycode.LEFT_SHIFT), # =
(0x64, Keycode.LEFT_SHIFT), # >
(0x2d, Keycode.LEFT_SHIFT), # ?
(0x14, Keycode.RIGHT_ALT), # @
(0x04, Keycode.LEFT_SHIFT), # A
(0x05, Keycode.LEFT_SHIFT), # B
(0x06, Keycode.LEFT_SHIFT), # C
(0x07, Keycode.LEFT_SHIFT), # D
(0x08, Keycode.LEFT_SHIFT), # E
(0x09, Keycode.LEFT_SHIFT), # F
(0x0a, Keycode.LEFT_SHIFT), # G
(0x0b, Keycode.LEFT_SHIFT), # H
(0x0c, Keycode.LEFT_SHIFT), # I
(0x0d, Keycode.LEFT_SHIFT), # J
(0x0e, Keycode.LEFT_SHIFT), # K
(0x0f, Keycode.LEFT_SHIFT), # L
(0x10, Keycode.LEFT_SHIFT), # M
(0x11, Keycode.LEFT_SHIFT), # N
(0x12, Keycode.LEFT_SHIFT), # O
(0x13, Keycode.LEFT_SHIFT), # P
(0x14, Keycode.LEFT_SHIFT), # Q
(0x15, Keycode.LEFT_SHIFT), # R
(0x16, Keycode.LEFT_SHIFT), # S
(0x17, Keycode.LEFT_SHIFT), # T
(0x18, Keycode.LEFT_SHIFT), # U
(0x19, Keycode.LEFT_SHIFT), # V
(0x1a, Keycode.LEFT_SHIFT), # W
(0x1b, Keycode.LEFT_SHIFT), # X
(0x1d, Keycode.LEFT_SHIFT), # Y
(0x1c, Keycode.LEFT_SHIFT), # Z
(0x25, Keycode.RIGHT_ALT), # [
(0x2d, Keycode.RIGHT_ALT), # bslash \
(0x26, Keycode.RIGHT_ALT), # ]
(0x35), # ^
(0x38, Keycode.LEFT_SHIFT), # _
(0x2e, Keycode.LEFT_SHIFT), # `
(0x04), # a
(0x05), # b
(0x06), # c
(0x07), # d
(0x08), # e
(0x09), # f
(0x0a), # g
(0x0b), # h
(0x0c), # i
(0x0d), # j
(0x0e), # k
(0x0f), # l
(0x10), # m
(0x11), # n
(0x12), # o
(0x13), # p
(0x14), # q
(0x15), # r
(0x16), # s
(0x17), # t
(0x18), # u
(0x19), # v
(0x1a), # w
(0x1b), # x
(0x1d), # y
(0x1c), # z
(0x24, Keycode.RIGHT_ALT), # {
(0x64, Keycode.RIGHT_ALT), # |
(0x27, Keycode.RIGHT_ALT), # }
(0x30, Keycode.RIGHT_ALT), # ~
(0x4c), # DEL
(0x00), # [NOT printable] in some docs shown as € symbol, but not so in python
(0x00), # [not printable]
(0x00), # ‚
(0x00), # ƒ
(0x00), # „
(0x00), # …
(0x00), # †
(0x00), # ‡
(0x00), # ˆ
(0x00), # ‰
(0x00), # Š
(0x00), # ‹
(0x00), # Œ
(0x00), #
(0x00), # Ž
(0x00), # [not printable]
(0x00), # [not printable]
(0x00), # ‘
(0x00), # ’
(0x00), # “
(0x00), # ”
(0x00), # •
(0x00), # –
(0x00), # —
(0x00), # ˜
(0x00), # ™
(0x00), # š
(0x00), # ›
(0x00), # œ
(0x00), # [not printable]
(0x00), # ž
(0x00), # Ÿ
(0x00), # [not printable]
(0x00), # ¡
(0x00), # ¢
(0x00), # £
(0x00), # ¤
(0x00), # ¥
(0x00), # ¦
(0x20, Keycode.LEFT_SHIFT), # §
(0x00), # ¨
(0x00), # ©
(0x00), # ª
(0x00), # «
(0x00), # ¬
(0x00), # [not printable]
(0x00), # ®
(0x00), # ¯
(0x35, Keycode.LEFT_SHIFT), # °
(0x00), # ±
(0x1f, Keycode.RIGHT_ALT), # ²
(0x20, Keycode.RIGHT_ALT), # ³
(0x2e), # ´
(0x10, Keycode.RIGHT_ALT), # µ
(0x00), # ¶
(0x00), # ·
(0x00), # ¸
(0x00), # ¹
(0x00), # º
(0x00), # »
(0x00), # ¼
(0x00), # ½
(0x00), # ¾
(0x00), # ¿
(0x00), # À
(0x00), # Á
(0x00), # Â
(0x00), # Ã
(0x34, Keycode.LEFT_SHIFT), # Ä
(0x00), # Å
(0x00), # Æ
(0x00), # Ç
(0x00), # È
(0x00), # É
(0x00), # Ê
(0x00), # Ë
(0x00), # Ì
(0x00), # Í
(0x00), # Î
(0x00), # Ï
(0x00), # Ð
(0x00), # Ñ
(0x00), # Ò
(0x00), # Ó
(0x00), # Ô
(0x00), # Õ
(0x33, Keycode.LEFT_SHIFT), # Ö
(0x00), # ×
(0x00), # Ø
(0x00), # Ù
(0x00), # Ú
(0x00), # Û
(0x2f, Keycode.LEFT_SHIFT), # Ü
(0x00), # Ý
(0x00), # Þ
(0x2d), # ß
(0x00), # à
(0x00), # á
(0x00), # â
(0x00), # ã
(0x34), # ä
(0x00), # å
(0x00), # æ
(0x00), # ç
(0x00), # è
(0x00), # é
(0x00), # ê
(0x00), # ë
(0x00), # ì
(0x00), # í
(0x00), # î
(0x00), # ï
(0x00), # ð
(0x00), # ñ
(0x00), # ò
(0x00), # ó
(0x00), # ô
(0x00), # õ
(0x33), # ö
(0x00), # ÷
(0x00), # ø
(0x00), # ù
(0x00), # ú
(0x00), # û
(0x2f), # ü
(0x00), # ý
(0x00), # þ
(0x00) # ÿ
]
Loading