# Keyboard not visible in polyscope

**URL:** <https://forum.universal-robots.com/t/keyboard-not-visible-in-polyscope/22489>\
**Category:** Java\
**Created:** [July 6, 2022, 2:18pm UTC](https://forum.universal-robots.com/t/keyboard-not-visible-in-polyscope/22489 "2022-07-06T14:18:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon30216221](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@anon30216221](https://forum.universal-robots.com/u/anon30216221)\
**Post date:** [July 6, 2022, 2:18pm UTC](https://forum.universal-robots.com/t/keyboard-not-visible-in-polyscope/22489/1 "2022-07-06T14:18:24Z")

</div>

Hi all,

I made a URCap using the ursim software. Now I’m trying to test the software on an actual UR but I am running into a problem. When I press on a textfield in PolyScope I am expecting the keyboard to show up so I can input a value but the keyboard doesn’t show up. Does anyone know how this can be fixed?

For example: When I press on the port to change this value. No keyboard shows up and I am not able to change anything. The ComboBox however does work fine.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/9/9a5d6d195826aa251321bbce4acc995ffc035c83.png)

---

<div class="post-metadata">

**Author:** ![eric.feldmann](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eric.feldmann](https://forum.universal-robots.com/u/eric.feldmann)\
**Post date:** [July 6, 2022, 3:43pm UTC](https://forum.universal-robots.com/t/keyboard-not-visible-in-polyscope/22489/2 "2022-07-06T15:43:57Z")

</div>

Here’s an example of a double keyboard attached to a button:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/8/85e7fefa17ae6dab8dafb78eb824cb76285ec961.png)

You can get an instance of keyboardFactory through `apiProvider.getUserInterfaceAPI().getUserInteraction()`. I’ve just made a class containing all the different types so I don’t have to type it every time.

Here’s the getDoubleKeyboard() method:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/2/23b815d026b7c48164b0f2981dcce69cfa5236c0.png)

You can do something similar just replace all the Doubles with Ints

---

<div class="post-metadata">

**Author:** ![anon30216221](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@anon30216221](https://forum.universal-robots.com/u/anon30216221)\
**Post date:** [July 7, 2022, 10:33am UTC](https://forum.universal-robots.com/t/keyboard-not-visible-in-polyscope/22489/3 "2022-07-07T10:33:36Z")

</div>

Thank you, I have managed to solve my issue using the following implementation:

```auto

	public KeyboardTextInput getKeyboardTextInput() {
		return keyboardFactory.createStringKeyboardInput();
	}
	
	public KeyboardInputCallback<String> getKeyboardTextInputCallback() {
		return new KeyboardInputCallback<String>() {
			@Override
			public void onOk(String tosettext) {
				String field = getSelectedInputField();
				if(field.equals("IP")) {
					view.setIPTextField(tosettext);
				}else if(field.equals("PORT")) {
					view.setPORTTextField(tosettext);
				}else if(field.equals("NAME")) {
					view.setNAMETextField(tosettext);
				}else if(field.equals("ATYPE")) {
					view.setATYPETextField(tosettext);
				}else if(field.equals("PMC_LOC")) {
					view.setPMCLOCTextField(tosettext);
				}else if(field.equals("BIT")) {
					view.setBITTextField(tosettext);
				}else if(field.equals("DTYPE")) {
					view.setDTYPETextField(tosettext);
				}else if(field.equals("PIN")) {
					view.setPINTextField(tosettext);
				}
			}
		};
	}

```

This allows me to handle multiple textfields on the same page.
