Updated Key options, layout

This commit is contained in:
itdominator 2022-09-16 19:36:55 -05:00
parent 0a2e258766
commit 2366e524a7
4 changed files with 25 additions and 12 deletions

View File

@ -52,19 +52,19 @@ keys_json = {
"keys": { "keys": {
"row1": { "row1": {
"pKeys": ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'], "pKeys": ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'],
"sKeys": ['~', '^', '#', '$', '%', '&', '-', '_', '(', ')'], "sKeys": ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'],
}, },
"row2": { "row2": {
"pKeys": ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'], "pKeys": ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'],
"sKeys": ['\\', '/', '|', ':', '=', '+', '"', '*', '<', '>'], "sKeys": ['\\', '^', '#', '$', '%', '&', '-', '_', '<', '>'],
}, },
"row3": { "row3": {
"pKeys": ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', "'"], "pKeys": ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', "'"],
"sKeys": ['`', '', '', '', '', '', '', '', '[', ']'], "sKeys": ['\\', '/', '|', ':', '=', '+', '"', '*', ';', '!'],
}, },
"row4": { "row4": {
"pKeys": ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '?'], "pKeys": ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '?'],
"sKeys": ['', '', '', '', '', '', ';', '!', '{', '}'] "sKeys": ['`', '', '', '', '[', ']', '(', ')', '{', '}']
}, },
} }
} }

View File

@ -6,7 +6,7 @@ gi.require_version('Gtk', '3.0')
from gi.repository import Gtk from gi.repository import Gtk
# Application imports # Application imports
from ..widgets.defined_keys import Del_Key, Ctrl_Key, Shift_Key, Alt_Key, PrtSc_Key, Up_Key, Down_Key, Left_Key, Right_Key from ..widgets.defined_keys import Tab_Key, Del_Key, Ctrl_Key, Shift_Key, Alt_Key, PrtSc_Key, Up_Key, Down_Key, Left_Key, Right_Key
@ -17,7 +17,7 @@ class Button_Box(Gtk.ButtonBox):
def __init__(self): def __init__(self):
super(Button_Box, self).__init__() super(Button_Box, self).__init__()
for key in [Del_Key(), Ctrl_Key(), Shift_Key(), Alt_Key(), PrtSc_Key()]: for key in [Tab_Key(), Del_Key(), Ctrl_Key(), Shift_Key(), Alt_Key(), PrtSc_Key()]:
self.add(key) self.add(key)
class List_Box(Gtk.ScrolledWindow): class List_Box(Gtk.ScrolledWindow):

View File

@ -6,7 +6,7 @@ gi.require_version('Gtk', '3.0')
from gi.repository import Gtk from gi.repository import Gtk
# Application imports # Application imports
from ..widgets.defined_keys import Symbols_Key, CAPS_Key from ..widgets.defined_keys import Esc_Key, Symbols_Key, CAPS_Key
@ -19,7 +19,7 @@ class Left_Column(Gtk.Box):
self.setup_styling() self.setup_styling()
for key in [Symbols_Key(), CAPS_Key()]: for key in [Symbols_Key(), Esc_Key(), CAPS_Key()]:
self.add(key) self.add(key)
self.show_all() self.show_all()

View File

@ -13,6 +13,13 @@ from .key import Key
############################## Left_Column Keys ############################## ############################## Left_Column Keys ##############################
class Esc_Key(Key):
def __init__(self):
super(Esc_Key, self).__init__("Esc", "Esc")
def setup_signals(self):
self.connect("released", self._do_press_special_key)
class Symbols_Key(Key): class Symbols_Key(Key):
def __init__(self): def __init__(self):
super(Symbols_Key, self).__init__("Symbols", "Symbols") super(Symbols_Key, self).__init__("Symbols", "Symbols")
@ -76,10 +83,12 @@ class Enter_Key(Key):
############################# Bottom_Key_Row Keys ############################# ############################# Bottom_Key_Row Keys #############################
class AT_Key(Key): class Esc_Key(Key):
def __init__(self): def __init__(self):
super(AT_Key, self).__init__("@", "@") super(Esc_Key, self).__init__("Esc", "Esc")
def setup_signals(self):
self.connect("released", self._do_press_special_key)
class Space_Key(Key): class Space_Key(Key):
def __init__(self): def __init__(self):
@ -88,6 +97,10 @@ class Space_Key(Key):
def setup_signals(self): def setup_signals(self):
self.connect("released", self._do_press_special_key) self.connect("released", self._do_press_special_key)
class AT_Key(Key):
def __init__(self):
super(AT_Key, self).__init__("@", "@")
class COM_Key(Key): class COM_Key(Key):
def __init__(self): def __init__(self):
super(COM_Key, self).__init__(".com", ".com") super(COM_Key, self).__init__(".com", ".com")
@ -95,9 +108,9 @@ class COM_Key(Key):
############################ Controls_Column Keys ############################ ############################ Controls_Column Keys ############################
class Esc_Key(Key): class Tab_Key(Key):
def __init__(self): def __init__(self):
super(Esc_Key, self).__init__("Esc", "Esc") super(Tab_Key, self).__init__("Tab", "Tab")
def setup_signals(self): def setup_signals(self):
self.connect("released", self._do_press_special_key) self.connect("released", self._do_press_special_key)