yuuchilyann / blockly

Automatically exported from code.google.com/p/blockly
0 stars 0 forks source link

Please provide virtual keyboard #99

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

Before Christmas, I tried blockly on SMART Table in my daughter's (10 years 
old) class.
She solved text problems with blockly.
We found a lack of virtual keyboard on screen, while she renaming variables and 
gave values (numeric and string); she must walking between the table and the 
pc, beacuse she can drag&drop blocks with the pen, but she can't change values.

So, how could implement the Google's virtual keyboard similar to the attachment 
for value input?

Original issue reported on code.google.com by tvikto...@gmail.com on 29 Dec 2012 at 8:09

Attachments:

GoogleCodeExporter commented 8 years ago
I've been unsuccessful at determining what browser the SMART Table uses.  Next 
time you visit the class could you enter the URL http://whatsmyuseragent.com/ 
into the table and make a note of what the user agent is?

Blockly does display a pop-up keyboard on touch screens running in Chrome on 
Android.  I hope we can get something working for the SMART Table too.

Thanks!

Original comment by neil.fra...@gmail.com on 29 Dec 2012 at 7:49

GoogleCodeExporter commented 8 years ago
It's as simple as could be.
The Smart Table is more like Board, than table (sorry if i confuse you) and 
it's a simple system with a Table, a Pen, a Projector, some sort of sensor 
(attached on the table left side) and a PC (with Mimio Studio). We tried 
blockly on a simple WinXp with Chrome browser. 

This is the exact tool (in the first two picture)
http://www.eutrust.hu/media/file/katalogusok/1-interaktiv-oktatas-katalogus/1-in
teraktiv-tablak-katalogus/mimio_xi_teach_rs_210x297.pdf

http://blog.sulinet.hu/ttneni/files/2010/05/mimio-t%C3%A1bla-%C3%A9s-laptop.jpg

I tried blockly in Chrome on Android ad it's perfect.
Here, in Hungary most of the schools buyed similar SMART "systems" mentioned 
above (a Table, a Pen, a Projector, some sort of sensor and a PC with windows).

So, this thing isn't a touch screen device, just a "simple" board with pen.

Thnak you for your attention!

Original comment by tvikto...@gmail.com on 30 Dec 2012 at 9:29

GoogleCodeExporter commented 8 years ago
Hi,

Maybe i found a solution.
There is a script at: http://www.greywyvern.com/code/javascript/keyboard ,
and the Advanced stuff contains a description and a sample code to connect the 
VK:

"Advanced Stuff

The script exposes the event attachment function to scripting via the global 
VKI_attach function. If your document creates inputs after the page has loaded, 
whether through Ajax processes or user interaction, you can attach the keyboard 
events to them by passing the element to VKI_attach. For example:

var foo = document.createElement('input');
document.body.appendChild(foo);
VKI_attach(foo);
"

So, I think it could help, but I don't know where could I add this code.

I tried to modify the filed_textinput.js at:
Blockly.FieldTextInput.injectDom_ = function(workspaceSvg) {
  /*
  <foreignObject height="22">
    <body xmlns="http://www.w3.org/1999/xhtml" class="blocklyMinimalBody">
      <input class="blocklyHtmlInput" xmlns="http://www.w3.org/1999/xhtml"/>
    </body>
  </foreignObject>
  */
  var foreignObject = Blockly.createSvgElement('foreignObject',
      {'height': 22}, workspaceSvg);
  Blockly.FieldTextInput.svgForeignObject_ = foreignObject;
  // Can't use 'Blockly.createSvgElement' since this is not in the SVG NS.
  var body = goog.dom.createDom('body', 'blocklyMinimalBody');
  var input = goog.dom.createDom('input', 'blocklyHtmlInput');
  Blockly.FieldTextInput.htmlInput_ = input;
  body.appendChild(input);
  VKI_attach(input);
  foreignObject.appendChild(body);
};

But no luck.
Could anybody help please?

thank you,
Viktor

Original comment by tvikto...@gmail.com on 3 Feb 2013 at 6:41

GoogleCodeExporter commented 8 years ago

Original comment by sper...@google.com on 8 Aug 2013 at 12:03