2

In my Windows Phone 7 Silverlight application I have my own custom keypad that I want to use instead of the standard soft keyboard. The problem that I have is that I have not found a way to completely disable or prevent the SIP/Soft Keyboard for my application or for the TextBox component.

  • Is it possible to disable the soft input keyboard in my application?
  • Is it possible to prevent the soft input keyboard from popping up when a TextBox get focus?
  • Can I extend or override any functions in TextBox to make it behave the way I want?

I’ve seen solutions how to hide the keyboard when a certain key is entered by moving focus off the TextBox but I want to prevent it from ever showing up.

My problem is very similar to what's stated on How do I prevent the software keyboard from popping up? and How to prevent keyboard to show in EditText onTouch? but for Windows Phone 7 instead.

I am fully aware that some may think it is stupid to use your own keypad instead of the standard input but I have my reasons for doing it this way and I just want to know if it is possible to achieve what's described.

Community
  • 1
  • 1
MrKiane
  • 4,803
  • 2
  • 17
  • 27
  • 1
    I am not convinced you need a TextBox. What functionality is in the TextBox that you want to reuse? – Emond Jan 18 '12 at 15:41
  • I want the look and feel of a TextBox. I want to show the current caret position and be able to move the caret around. As much of the TextBox functionality as possible but without using soft input keyboard. – MrKiane Jan 18 '12 at 17:58
  • @PederN what's the reasoning behind moving the caret around? I don't think any of us understand the purpose behind this rather then just using a TextBlock. And what do you expect if the user has a HW keyboard? (Or copy-pasting) – William Melani Jan 19 '12 at 02:52
  • 1
    @willmel The reason is that I want different input depending on how long the user is pressing the button, what the input is is directly associated with how long time the button is pressed. I have multiple TextBoxes on the screen and want the user to be able to select which TextBox the input should be inserted in. Tracking how long the button is pressed is not a problem. The problem is that I want to force the input to come from my own 'keypad,' not from the soft input keyboard. – MrKiane Jan 19 '12 at 07:21
  • Buddies, I've the same issues as posted in this thread. I want to implement a custom keyboard just like described by Peder N. I'm searching like crazy for infos... This ins't a easy task, uhn? =) – Marcelo Jan 18 '13 at 13:46

4 Answers4

4

If you don't want to use the SIP, you don't need a TextBox.

Use a TextBlock and bind it to the input generated by the custom buttons.

Emond
  • 50,210
  • 11
  • 84
  • 115
  • Maybe you are right, I'll consider this option. Ideally I would like to disable the software input keyboard in my application but it seem like it is impossible with the current Windows Phone API. – MrKiane Jan 18 '12 at 18:00
0

Peter, consider using THIS, with customizations. I'm working in a project where we use a custom keyboard. With some extra codes and customizations I've made a custom softkeyboard, as you can see in the screenshot bellow. Right now, my softkeyboard is working properly, but with some issues to be resolved yet.

enter image description here

My custom WP keyboard problems are:

  • There's no caret cursor;
  • The TextBox in my screen is a AutoCompleteBox, and when it opens the completions, my keyboard loses focus, and so I need an extra tap (this is my greates problem now)
  • WP native keyboard try to slide up when I choose an item within the completions
Marcelo
  • 2,075
  • 5
  • 21
  • 38
0

IsHitTestVisble =false solve your issue

0

Have a look at this blog post http://www.silverlightshow.net/items/Windows-Phone-7-Creating-Custom-Keyboard.aspx

Per Kastman
  • 4,466
  • 24
  • 21
  • I do not want to create a new keyboard, the keypad is in my app as regular buttons. According to the blog it seem like it is not possible to control the SIP the way I want. Maybe I need to create a custom control to make this work. The problem is that I want the functionality of TextBox but without the automatic keyboard popup. – MrKiane Jan 18 '12 at 15:22