How to inspect the keyboard buttons for iOS simulator Appium

I want to inspect the iOS simulator keyboard buttons to perform some actions.

driver.getPageSource();

Print above to console or log.