Giter Site home page Giter Site logo

pyhb's People

Contributors

blankriot96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pyhb's Issues

Spacing between letters in typetester is uneven.

The spacing between characters in the typing tester is uneven.

This causes a whole hoard of problems :

  • Can't figure out whether there is a space, or uneven spacing
  • Typing the wrong character leads to confusion

Some possible solutions :

  • Using alternative libraries to handle this (pygame_gui)
  • Huge refactor and new strategies for current design - textmanager is currently hard to extend.

Refactoring `TextManager` class

Refactoring the current TextManager class would be a good idea. Currently this class is used as a convenience utility to group together initialization data and runtime data, but this is against what a class is for.
A class should represent some data,/ represent some kind of object.

Moving to functional approach might be better. Extraction of result calculation is also a priority.

Updating README

The current README file assumes pyhb can still be installed from pypi.org
Some changes to be made:

  • Update installation process
  • Tabulate commands
  • Improve presentation

Branching strategy

Currently pyhb only has a main branch which represents the most active stage of the project.

But this has a couple issues, and I believe keeping the changes committed to separate branches, and then merged into main for releases works much better.

Possible branching strategy:

  • main branch for releases, dev branch for commits.
  • main branch for releases, (typetester, cli) branches for development.
  • releases branch for releases, main branch for development.

Keyboard sound effect plays after release

When you try pyhb start and then choose a sound pack, it doesn't actually play the sound effect until you release the key you are pressing. Now this by itself sounds fabulous and least problematic when typing constantly, but it just feels weird that the sound effect comes only after the key is released instead of immediately playing the sound when the key is pressed like an actual mechanical keyboard would make.

I have tried some things out in the keyboard_sound_effects.py but have failed to come out with any fast and memory efficient results. For example in this line, when changing it to

keyboard.on_pressed(set_release)

This works and now plays the sound immediately when clicking on a key.
But now the problem is that it starts the spam a very annoying sequence of the same sound when holding on to it.
I have made multiple attempts to fix this, such as removing everything related to the global RELEASED varaible, and instead just playing the sound. But this does the same as keyboard.on_pressed and for some reason is even slower
Another attempt was

    global RELEASED
    while True:
        keyboard.on_release(set_release)

        if RELEASED:
            key_pressed = keyboard.read_key()
            if key_pressed in conf_vals:
                if sound_pack == "nk-cream":
                    sound = pygame.mixer.Sound(
                        f"{user_path}/Soundpacks/{sound_pack}/{key_pressed}.wav"
                    )
                else:
...

But now this is incredibly slow and causes an eventual MemoryError every time.

Should `pyhb` be on pypi?

pyhb is essentially an application on its own, it doesn't extend or help Python in any way. There seems to be little to no reason for this to exist on pypi.

Some things to think about:

  • Ease of download (alternatives, and requirements)
  • Visibility
  • Traffic data collection

Tests broken and invalid

Currently, the unittests don't really help. It tests minor things and fails due to improper checking

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.