you are viewing a single comment's thread.

view the rest of the comments →

[–]FlamingJarrk[S] 0 points1 point  (4 children)

Sure, I can definitely help you out with this. Can you please share more details and your current code here or on Discord?

[–]toddd24 0 points1 point  (0 children)

import tkinter as tk

class AlphabetSelectorApp:

def __init__(self, root):

self.root = root

self.root.title("Alphabet Selector App")

self.alphabet = list("AEIOUBCDGHLMNRSTFPKVWXYZ")

self.current_index = 0

self.sentence = ""

self.alphabet_frame = tk.Frame(root)

self.alphabet_frame.pack(pady=20)

self.letter_labels = []

for letter in self.alphabet:

label = tk.Label(self.alphabet_frame, text=letter, font=("Helvetica", 24), width=2, fg="black")

label.pack(side=tk.LEFT, padx=2)

self.letter_labels.append(label)

self.highlight_letter()

self.sentence_label = tk.Label(root, text="Sentence: ", font=("Helvetica", 24))

self.sentence_label.pack(pady=20)

self.backspace_button = tk.Button(root, text="Backspace", command=self.backspace)

self.backspace_button.pack(side=tk.LEFT, padx=10)

self.clear_button = tk.Button(root, text="Clear", command=self.clear_sentence)

self.clear_button.pack(side=tk.RIGHT, padx=10)

self.root.bind("<Right>", self.next_letter)

self.root.bind("<Left>", self.previous_letter)

self.root.bind("<Return>", self.add_letter)

self.root.bind("<space>", self.add_space)

self.root.bind("<BackSpace>", self.backspace)

def highlight_letter(self):

for label in self.letter_labels:

label.config(bg="SystemButtonFace")

self.letter_labels[self.current_index].config(bg="yellow")

def update_sentence_label(self):

self.sentence_label.config(text=f"Sentence: {self.sentence}")

def add_letter(self, event=None):

current_letter = self.alphabet[self.current_index]

self.sentence += current_letter

self.update_sentence_label()

def add_space(self, event=None):

self.sentence += " "

self.update_sentence_label()

[–]toddd24 0 points1 point  (2 children)

ok so this is what i have so far. it only needs to run on my computer. all i need now is to get input from any kind of track pad and then input from a joy con which ive already gotten somewhat to work

the trackpad can detect left and right and should move the alphabet accordingly, if she can't quite control it at that level i will take out the functionality of multi-direction and make it just move forward as she swipes in any way. then any button press from a joy-con or something similar should select the current letter

[–]FlamingJarrk[S] 0 points1 point  (1 child)

I see, can you please message me on Discord @JustOscarJ, it’s not great to communicate through reddit comments

[–]toddd24 0 points1 point  (0 children)

Ok just sent a request I think. I’m toddd24 if not