bchao1 / bullet

🚅 Interactive prompts made simple. Build a prompt like stacking blocks.
https://pypi.org/project/bullet/
MIT License
3.55k stars 113 forks source link

How to contribute win32 and keyhandling updates to bullet #71

Open pjfarleyiii opened 3 years ago

pjfarleyiii commented 3 years ago

I have a set of updates written and tested to add correct win32 keyboard input processing and keyhandling additions to the Bullet, Check and Scrollbar classes that I think would benefit other users of bullet. I have added HOME_KEY and END_KEY keyhandling to all three bullet classes and PG_UP_KEY and PG_DOWN_KEY keyhandling to Scrollbar.

Edit2: I subsequently added a prompt_color variable to all the bullet classes with a prompt and fixed handling of x'08' as the backspace character for the input method of class myInput (and not just x'7f'). I also added "self.result = []" to the launch functions of VerticalPrompt and SlidePrompt so that they work the same if called a second time (i.e., only return the results of the last launch).

Edit 4: One more set of changes - I forgot to put in colors.RESET at the end prompt writes so the next line(s) don't get the prompt_color value.

How can I contribute these changes to bullet? I am totally ignorant of how github works, so I don't know how to give you my code changes.

Any baby-step instructions for contributing code to this github repository that you can provide would be appreciated.

Peter

Edit4: Diff -u changes attached and updated with latest changes.

bullet-diff.log

pjfarleyiii commented 3 years ago

I have done some self education in github and have created pull #79 with all of my enhancements.

Please let em know if this set of updates can be merged into the master branch. I would like my own python projects to require bullet but I cannot do that unless at minimum the Windows support is merged.

Regards,

Peter