Jump to content




On-Screen Keyboard

api lua utility

3 replies to this topic

#1 Dahknee

  • Members
  • 1,808 posts
  • Location/home/da

Posted 12 November 2014 - 12:24 PM

Hello!:
I have recently wanted to make a on screen keyboard, no reason why, just thought it would be cool, until I started to really think about the possibilities... In 2 hours I made a simple table, that will allow you to type, and backspace and more, with F1 to 5 keys that return so can be used for options. A Caps Lock function and others. I wanted to make it because it would be cool to use with monitors, it's ironic how this first update doesn't run on monitors and just on terminal... New ideas or things to add? Tell me!

PLEASE:

Please don't slate it, only shared it with you because it may be useful and I wanted a version out for you lovely people to help test for me! Any bugs PM me!

How To Use:
Simply add the API to your program, or load it as an external one, and just call the inputKeyboard() function with a variable in front to grab the text returned!

Download:
pastebin get 16JAjfUf keyboard

Example:
os.loadAPI("keyboard")
sText = keyboard.inputKeyboard()

NOTE:
Under the keyboard.inputKeyboard() function you will need to redraw the screen, so personally I would use the window API to save the information, run this then redraw the window.

Anyway:

Features:
  • Pretty GUI
  • On-Screen Touch
  • Caps Lock Option
  • Function buttons that return the function number
  • Backspace and Space
  • Saves to a local table, that is emptied.
  • Returns string after!
Images:
The images are attached at the bottom!

Next Update:
  • Monitor Support
  • Custom X and Y positions to draw the keyboard
  • Copy and Paste




Attached Thumbnails

  • Attached Image: osk3.PNG


#2 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 12 November 2014 - 03:09 PM

This looks awesome!
Great job!

#3 Agent Silence

  • Members
  • 319 posts
  • Location[string "FindMe"]:23143: bad argument #1 to 'returnPos' (vector expected, got nil)

Posted 12 November 2014 - 03:51 PM

You might want to invert the background and text color.

So the keys are white and the background is black

#4 Dahknee

  • Members
  • 1,808 posts
  • Location/home/da

Posted 12 November 2014 - 05:01 PM

View PostRequiem, on 12 November 2014 - 03:51 PM, said:

You might want to invert the background and text color.

So the keys are white and the background is black

Preferred the chosen, will make it configurable!

View PostFreack100, on 12 November 2014 - 03:09 PM, said:

This looks awesome!
Great job!

Thanks, hopefully will be ready by the end of the week for configs and monitors!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users