Pygame Text Input
A small module that enables you to input text with your keyboard using pygame
Write text in pygame! This small module can be used to write text in pygame. It includes a blinking cursor that can be moved using the left and right arrow key as well as the home and the end button. You can adjust text color, font, antialias, and more. Install with `pip install pygame-textinput`, and check github for instructions!
Pygame.org account Comments
William Savage 2017-01-05 16:23:27
Amazing module! Thank you very much, ive been using Eztext for my project and it hasnt been working very well. When i add your cxode from github and add the:
I get every key i pressed comes up twice, is their a way round this as it kind of ruins the module
William Savage 2017-01-05 23:12:43
I have solved this
Matt 2017-01-08 02:36:46
Could you possibly post how you solved it, in case anyone else comes here with the same problem?
Henry D 2017-03-20 19:45:08.229355Hey! does this allow for a text box to be blitted to the game display? i intend to use this as a user friendly input for a quiz, (non for profit of course) and was wondering if the text box can be blitted to a certain part of the screen(in my case the bottom middle of the game display) thanks in advance :)
Anton de Groot 2017-11-22 20:22:10.014610Awesome module, it has been very helpful. One thing I've noticed though is: When I type "^" it gets stuck in a loop and keeps entering ^'s. It does this whenever ^ is entered by "shift+6+space". However this does not occur when ^ is entered by the combination: "shift+6". On Ubuntu I have two keyboard settings: "(us,with dead keys)" and just "(us)". The bug occurs on "us,with dead keys" but not the other. This means that on windows this might occur on Dutch/Norwegian/... keyboards but not on an English keyboard or keyboard setting.
Rodion 2019-02-09 09:21:27.008202I get an error: import pygame_textinput ModuleNotFoundError: No module named 'pygame_textinput'
LolloAntoni 2019-08-26 17:25:05.797110How do you install it?
S 2020-06-15 08:07:57.380576How do you install it?