by admin

Poker 3 Keyboard Layout

Python proof-of-concept for a Poker 3 keyboard layout emulator (not completed).

Fully Tested all keys & 4 mode switches on the bottom, all works great (as you can see in pictures 3, 11,12)! Cherry MX Red Switches. Vortex POK3R - Poker 1 Cherry MX Red Switches 60% Mechanical Keyboard - VGC!

  1. Accessorise your keyboard with a wide variety of keycaps, noise dampening o-rings and other mechanical keyboard enhancements to take your gaming to the next level. In the early 1970’s, IBM developed the first mechanical keyboard. They based the tactile feel and sound on the humble typewriter ensuring they felt familiar to use.
  2. Poker 3 - PBT - ISO-Nordic - Alu Casing Black version. Ducky Keycap Abs Ninja 108 Key 60 keyboard low profile aluminum case Vortex Doubleshot Keycaps Kbt Mechanical Keyboard Custom Keyboard Layout Windows 8 originative carbon black pbt keycap set Mens Leather Wrist Accessories Planck Mechanical Keyboard Kit Corsair Keyboard.
  3. Emulate the KBC Poker 3 keyboard layout on a standard keyboard by remapping the: CapsLock as the Poker 3 Fn key. This needs to be run as root and it's probably.
poker3.py
Poker 3 Keyboard Layout

3 Card Poker Layout

#!/usr/bin/env python3
# Remaps the Caps Lock key to serve as an alternate function key to enable the
# KBC Poker 3 keyboard layout on other keyboards. Be sure to disable Caps Lock
# before using this ('setxkbmap -option caps:none').
fromevdevimportInputDevice, UInput, categorize, ecodes
# TODO: Figure out how to automatically detect keyboards
dev=InputDevice('/dev/input/event2')
capson=False
ui=UInput()
# Injects a keystroke.
definject(key):
ui.write(ecodes.EV_KEY, key, 1)
ui.write(ecodes.EV_KEY, key, 0)
ui.syn()
# Reads and acts on device input. We're specifically looking for keystrokes.
foreventindev.read_loop():
ifevent.typeecodes.EV_KEY:
# If the use has pressed or is holding Caps Lock, grab all device input.
ifevent.code58:
ifevent.value1:
capson=True
dev.grab()
elifevent.value0:
capson=False
dev.ungrab()
# If Caps Lock is down, check for the keys we're remapping.
elifcapsonTrueand (event.value1orevent.value2):
indices= {
22: ecodes.KEY_PAGEUP,
23: ecodes.KEY_UP,
24: ecodes.KEY_PAGEDOWN,
35: ecodes.KEY_HOME,
36: ecodes.KEY_LEFT,
37: ecodes.KEY_DOWN,
38: ecodes.KEY_RIGHT,
49: ecodes.KEY_END
}
# Try to inject our alternate keystroke.
try:
inject(indices[event.code])
except:
continue

How Many Keyboard Layouts

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment