Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6822

Virtual keyboard

$
0
0

@scemino wrote:

I don't know how to display the virtual keyboard and get all keys pressed with Keyboard.GetState() without using the KeyboardInput.Show method.

I tried this code:
var view = _game.Services.GetService<Android.Views.View>();
var imm = (Android.Views.InputMethods.InputMethodManager)Game.Activity.GetSystemService(Android.Content.Context.InputMethodService);
imm.ShowSoftInput(view, Android.Views.InputMethods.ShowFlags.Forced);
imm.ToggleSoftInput(Android.Views.InputMethods.ShowFlags.Forced, Android.Views.InputMethods.HideSoftInputFlags.ImplicitOnly);

The virtual keyboard is shown but nothin happens when we press a key.
Any solution ?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6822

Trending Articles