# Suppress keyboard on input focus

**URL:** <https://forum.ionicframework.com/t/suppress-keyboard-on-input-focus/125620>\
**Category:** ionic-v3\
**Created:** [March 23, 2018, 9:10am UTC](https://forum.ionicframework.com/t/suppress-keyboard-on-input-focus/125620 "2018-03-23T09:10:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![grahamsimmons](https://avatars.discourse-cdn.com/v4/letter/g/ce73a5/32.png) [@grahamsimmons](https://forum.ionicframework.com/u/grahamsimmons)\
**Post date:** [March 23, 2018, 9:10am UTC](https://forum.ionicframework.com/t/suppress-keyboard-on-input-focus/125620/1 "2018-03-23T09:10:27Z")

</div>

My app is to run on a device with physical scanning buttons. With focus on a field the keyboard pops up which I want to hide as the scan process will provide input to the input field.

How can I hide the keyboard in Ionic 3?

Can I force the keyboard to show of screen perhaps? or maybe changing a value in config.xml will do it?

I’ve tried loads of things like … disable on input field, but that stops any input. readonly and coding a focus on input but that still shows keyboard. keyboard.close doesn’t work even if it’s in a setTimeout function.

Please help as this is doing my head in.

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [March 23, 2018, 11:22am UTC](https://forum.ionicframework.com/t/suppress-keyboard-on-input-focus/125620/2 "2018-03-23T11:22:31Z")

</div>

Wasn’t there a method to hide the keyboard, and subscribe to id appearing and disappearing? Maybe this can be used to cancel this out and make it seem hidden all the time.

---

<div class="post-metadata">

**Author:** ![grahamsimmons](https://avatars.discourse-cdn.com/v4/letter/g/ce73a5/32.png) [@grahamsimmons](https://forum.ionicframework.com/u/grahamsimmons)\
**Post date:** [March 23, 2018, 11:54am UTC](https://forum.ionicframework.com/t/suppress-keyboard-on-input-focus/125620/3 "2018-03-23T11:54:41Z")

</div>

I don’t know. Is there an id for the keyboard that I can interact with? I’ve tried subscribing to the keyboard.onKeyboardShow() and then do a keyboard.close() but I cannot get this working. Either way, you’d see the keyboard flash up which isn’t ideal.

I’ve also tried passing in the button click event from the view and then in the function call either event.preventDefault() or event.stopPropagation() and neither do anything.

Any other idea?

---

<div class="post-metadata">

**Author:** ![sebamurgui](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@sebamurgui](https://forum.ionicframework.com/u/sebamurgui)\
**Post date:** [December 16, 2020, 1:56pm UTC](https://forum.ionicframework.com/t/suppress-keyboard-on-input-focus/125620/4 "2020-12-16T13:56:46Z")

</div>

Hi! Have you been able to solve this?

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 8:52pm UTC](https://forum.ionicframework.com/t/suppress-keyboard-on-input-focus/125620/5 "2021-07-19T20:52:25Z")

</div>

Closed on July 19, 2021, 8:52pm UTC


