# Keyboard events are not firing

**URL:** <https://forum.ionicframework.com/t/keyboard-events-are-not-firing/248755>\
**Category:** Ionic Angular\
**Created:** [July 30, 2025, 5:12pm UTC](https://forum.ionicframework.com/t/keyboard-events-are-not-firing/248755 "2025-07-30T17:12:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jkyoutsey](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@jkyoutsey](https://forum.ionicframework.com/u/jkyoutsey)\
**Post date:** [July 30, 2025, 5:12pm UTC](https://forum.ionicframework.com/t/keyboard-events-are-not-firing/248755/1 "2025-07-30T17:12:39Z")

</div>

I need to adjust an ion-modal’s position when the keyboard is shown on Android devices because the keyboard overlaps the input(s) on the modal. I’m in Ionic 8, Angular 19, Capacitor 7

I’ve tried the approach in the official docs: [Keyboard Guide: Tools to Manage an On-Screen Mobile App Keyboard](https://ionicframework.com/docs/developing/keyboard)

I’ve tried Keyboard, window.addEventListener, too.

But when the keyboard opens, I never hit the second console.log.

```typescript
import { Keyboard } from '@capacitor/keyboard';

	private async setupKeyboardListeners() {
		console.log('JKY: Setting up keyboard listeners');
		this.keyboardShowListener = await Keyboard.addListener('keyboardWillShow', info => {
			console.log(`JKY: Keyboard will show with height: ${info.keyboardHeight}`);
			this.adjustModalForKeyboard(info.keyboardHeight);
		});

		this.keyboardHideListener = await Keyboard.addListener('keyboardWillHide', () => {
			this.resetModalPosition();
		});
	}

```

I’m using an inline modal

```html
<ion-modal
	#aModal
	[initialBreakpoint]="1"
	[breakpoints]="[0, 1]"
	[canDismiss]="preventDismissByGesture"
	[backdropDismiss]="false"
	[keyboardClose]="false"
	[handle]="false"
>
	<ng-template>
		<my-component-with-an-input></my-component-with-an-input>
	</ng-template>
</ion-modal>

```

```scss
ion-modal {
	--height: auto;
}

```

I’m out of ideas as to what to try.

---

<div class="post-metadata">

**Author:** ![npaoli](https://avatars.discourse-cdn.com/v4/letter/n/5f8ce5/32.png) [@npaoli](https://forum.ionicframework.com/u/npaoli)\
**Post date:** [November 11, 2025, 7:31pm UTC](https://forum.ionicframework.com/t/keyboard-events-are-not-firing/248755/2 "2025-11-11T19:31:58Z")

</div>

Did you manage to make it work?
