Pygame Text Input
A small module that enables you to input text with your keyboard using pygame
Silas Gyger
(nearoo)
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!
Changes
Links
Releases
Pygame.org account Comments
-
William Savage 2017-01-05 16:23
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:
if textinput.update(events):
print(textinput.get_text())I get every key i pressed comes up twice, is their a way round this as it kind of ruins the module
-
Henry D 2017-03-20 19:45
Hey! 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
Awesome 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
I get an error: import pygame_textinput ModuleNotFoundError: No module named 'pygame_textinput' -
LolloAntoni 2019-08-26 17:25
How do you install it? -
S 2020-06-15 08:07
How do you install it?