Welcome to the Pythonista Community Forums!

Pythonista is a Python programming environment for iOS. To learn more, head over to the Pythonista Website.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Twitter
Keyboard when scene is running?
  • Can I have keyboard input while a scene is running? Would the keyboard pop up when a scene is running?
  • No, that is not possible. Which is why I made a keyboard to use in scenes. Look further down in the forum to find it :)

    I will update it soon, since there where a bug in the numerical part and I've added a thing or two :)
  • Thnx silverkors. I will use the code. But i think the app must really have a Keyboard input function for the scenes. It is crucial.

    I guess it is a good idea to built a thread for all the Feature Requests. Isn't it?
  • A good idea would be to have a Keyboard() module (like touch() module) which is assigned to a scene and returns each key which is hit on the keyboard.

    As i remember in one of the posts, OMZ described pyhtonista vs codea, as pythonista to be more for building "tools" rather than "games" in Lua. I agree and thatis why I guess keyboard input is crucial since I guess it is much widely used in tools rather than games.
  • Dear OMZ

    do you think we will have a keyboard module in the next update?
  • It's certainly something I will consider, but please understand that I usually cannot comment on timeframes for specific (non-trivial) feature requests.
  • ok. i understand. thank you. you have already done a great job. you know, i am exploring Pythonista and that's why i post so many questions (one will come in couple of minutes!) and feature requests. but i totally understand that wishing a feature is easy but making it may not be so easy!

    as for keyboard, as you also suggested in another post, i use Pythonista for making tools rather than games and, you know, in these sort of apps keyboard input has a crucial role.

    anyway, i will wait for the keyboard feature, while enjoying Pythonista.

    PS: as i suggested in another post, i think it will be a good idea for the forum to have "Feature Requests" and "Issue Tracker" sections. i guess it will make your work in developing Pythonista easier.
  • Check out my fileman script and pick out the KbdLayer class, there you have a keyboard, it evens renders it if you don't have the png:s.
  • thnx so much silverkors.

    i now don't have access to my idevice. as far as i could check from the class it draws a keyboard using rect and text. it is cool.

    actually i am working on a simpler keyboard (just lower-key letters, no numbers).

    my approch has been to load the iPhone keyboard pic as png. and for every key you hit it shows a somehow big rectangle of the letter above the key (something like when you hit a key in native iPhone keyboard). so it needs just three layers (keyboard, rectangle image, textlayer of the key you hit).

    i will upload it when ready
  • Well if you look closer at my code, that is what my keyboard does!
    It only draws it if it doesn't already exist as a png. After that it uses the png on one layer and draws a box over each key when you press them, with the letter in it!
  • The drawing is done using PIL, the Rect:s are uppercase and just definitions of the frames for the keys.