1. Traverse to the view on the iPad keyboard
16:33:42. 849 appforipad [7279: 207] viewclass: <uikeyboardautomatic: 0xaa33160; frame = (0 0; 768 264); opaque = no; layer = <calayer: 0xaa332b0>
16:33:42. 850 appforipad [7279: 207] viewclass: <uikeyboardimpl: 0xaa2e1c0; frame = (0 0; 768 264); opaque = no; layer = <calayer: 0xaa33460>
16:33:42. 852 appforipad [7279: 207] viewclass: <uikeyboardlayoutstar: 0xaa3ab60; frame = (0 0; 768 264); layer = <calayer: 0xaa3ad20>
16:33:42. 853 appforipad [7279: 207] viewclass: <uikbkeyplaneview: 0xaa54c30; frame = (0 0; 768 264); layer = <calayer: 0xaa54d30>
16:33:42. 854 appforipad [7279: 207] viewclass: <uikbkeyview: 0xaa551b0; frame = (3 6; 63 62); opaque = no; userinteractionenabled = no; layer =
Uikbkeyplaneview is the keyboard view, and the key is uikbkeyview. For Class files, see:
Http://github.com/kennytm/iphone-private-frameworks/tree/master/UIKit/
1-1 add nsnotificationcenter
[[nsicationcenter center defacenter center] addobserver: Self
selector: @ selector (addcustomkeyboardbutton)
name: uikeyboardwillshownotification
Object: Nil];
1-2-(void) addcustomkeyboardbutton {
For (ID object in [[uiapplication sharedapplication] windows]) {
If ([object iskindofclass: [uiwindow class]) {
Uiwindow * Windows = (uiwindow *) object;
For (uiview * tmpview in windows. subviews ){
If ([tmpview. subviews count]> 0)
[Self scansubviewin: tmpview];
}
}
}
}
1-3-(void) scansubviewin :( uiview *) aview {
For (uiview * tmpview in aview. subviews ){
If ([[tmpview description] hasprefix: @ "<uikbkeyplaneview"] = Yes ){
// Do something to keyboardview
For (uiview * keyboardbutton in tmpview. subviews ){
If ([[keyboardbutton description] hasprefix: @ "<uikbkeyview"] = Yes ){
Nsstring * buttonname = [[keyboardbutton key] Name];
// Do something to keyboardbuttonview
}
}
}
If ([tmpview. subviews count]> 0 ){
[Self scansubviewin: tmpview];
}
}
}
IPad button name and corresponding Frame
Portrait screen:
16:26:02. 738 appforipad [7206: 207] keyname: digit-1 frame)
16:26:02. 739 appforipad [7206: 207] keyname: digit-2 frame)
16:26:02. 740 appforipad [7206: 207] keyname: digit-3 frame: (, 62)
16:26:02. 741 appforipad [7206: 207] keyname: digit-4 frame: (, 6, 64, 62)
16:26:02. 743 appforipad [7206: 207] keyname: digit-5 frame: (281,6, 63,62)
16:26:02. 744 appforipad [7206: 207] keyname: digit-6 frame: (, 6, 64, 62)
16:26:02. 744 appforipad [7206: 207] keyname: digit-7 frame: (, 6)
16:26:02. 745 appforipad [7206: 207] keyname: digit-8 frame: (, 6, 64, 62)
16:26:02. 745 appforipad [7206: 207] keyname: digit-9 frame: (559,6, 63,62)
16:26:02. 746 appforipad [7206: 207] keyname: digit-0 frame: (, 6, 64, 62)
16:26:02. 747 appforipad [7206: 207] keyname: hyphen-minus frame)
16:26:02. 748 appforipad [7206: 207] keyname: solidus frame)
16:26:02. 748 appforipad [7206: 207] keyname: Colon frame: (170,72, 63,60)
16:26:02. 749 appforipad [7206: 207] keyname: semicolon frame)
16:26:02. 749 appforipad [7206: 207] keyname: Left-parenthesis frame)
16:26:02. 751 appforipad [7206: 207] keyname: Right-parenthesis frame: (377,72, 63,60)
16:26:02. 752 appforipad [7206: 207] keyname: Primary-currency-sign frame)
16:26:02. 754 appforipad [7206: 207] keyname: ampersand frame)
16:26:02. 755 appforipad [7206: 207] keyname: commercial-at frame: (584,72, 63,60)
16:26:02. 755 appforipad [7206: 207] keyname: full-stop frame: (207,136, 60)
16:26:02. 755 appforipad [7206: 207] keyname: comma frame: (275,136)
16:26:02. 756 appforipad [7206: 207] keyname: Question-mark frame: (343,136, 60)
16:26:02. 756 appforipad [7206: 207] keyname: Exclamation-mark frame: (411,136, 60)
16:26:02. 759 appforipad [7206: 207] keyname: apostrophe frame: (479,136)
16:26:02. 761 appforipad [7206: 207] keyname: quotation-mark frame: (547,136, 60)
16:26:02. 762 appforipad [7206: 207] keyname: delete-Key Frame)
16:26:02. 764 appforipad [7206: 207] keyname: Undo-Key Frame: (71,136,130, 60)
16:26:02. 766 appforipad [7206: 207] keyname: More-Key Frame: (3,200,198, 60)
16:26:02. 768 appforipad [7206: 207] keyname: unlabeled-space-Key Frame: (207,200,334, 60)
16:26:02. 771 appforipad [7206: 207] keyname: More-Key Frame: (547,200,150, 60)
16:26:02. 774 appforipad [7206: 207] keyname: Dismiss-Key Frame: (703,200, 60)
16:26:02. 776 appforipad [7206: 207] keyname: Return-Key Frame: (653,72, 112,60)
16:26:02. 777 appforipad [7206: 207] keyname: Shift-Key Frame: (3,136, 60)
16:26:02. 777 appforipad [7206: 207] keyname: Shift-Key Frame: (683,136)
Landscape screen:
16:29:08. 091 appforipad [7206: 207] keyname: digit-1 frame)
16:29:08. 092 appforipad [7206: 207] keyname: digit-2 frame)
16:29:08. 101 appforipad [7206: 207] keyname: digit-3 frame)
16:29:08. 102 appforipad [7206: 207] keyname: digit-4 frame)
16:29:08. 103 appforipad [7206: 207] keyname: digit-5 frame)
16:29:08. 105 appforipad [7206: 207] keyname: digit-6 frame: (, 9)
16:29:08. 107 appforipad [7206: 207] keyname: digit-7 frame: (562,9)
16:29:08. 108 appforipad [7206: 207] keyname: digit-8 frame)
16:29:08. 109 appforipad [7206: 207] keyname: digit-9 frame: (, 9)
16:29:08. 110 appforipad [7206: 207] keyname: digit-0 frame: (84)
16:29:08. 113 appforipad [7206: 207] keyname: hyphen-minus frame: (, 95)
16:29:08. 119 appforipad [7206: 207] keyname: solidus frame)
16:29:08. 121 appforipad [7206: 207] keyname: Colon frame)
16:29:08. 123 appforipad [7206: 207] keyname: semicolon frame: (, 95)
16:29:08. 127 appforipad [7206: 207] keyname: Left-parenthesis frame: (random, 95)
16:29:08. 130 appforipad [7206: 207] keyname: Right-parenthesis frame: (502,95, 84,79)
16:29:08. 132 appforipad [7206: 207] keyname: Primary-currency-sign frame: (594,95, 84,79)
16:29:08. 133 appforipad [7206: 207] keyname: ampersand frame)
16:29:08. 134 appforipad [7206: 207] keyname: commercial-at frame)
16:29:08. 136 appforipad [7206: 207] keyname: full-stop frame: (276,181)
16:29:08. 137 appforipad [7206: 207] keyname: comma frame: (367,181)
16:29:08. 139 appforipad [7206: 207] keyname: Question-mark frame: (457,181)
16:29:08. 140 appforipad [7206: 207] keyname: Exclamation-mark frame: (548,181)
16:29:08. 140 appforipad [7206: 207] keyname: apostrophe frame: (638,181)
16:29:08. 141 appforipad [7206: 207] keyname: quotation-mark frame: (729,181)
16:29:08. 142 appforipad [7206: 207] keyname: delete-Key Frame: (934,9)
16:29:08. 143 appforipad [7206: 207] keyname: Undo-Key Frame: (95,181,173, 79)
16:29:08. 143 appforipad [7206: 207] keyname: More-Key Frame: (4,267,264, 79)
16:29:08. 144 appforipad [7206: 207] keyname: unlabeled-space-Key Frame: (276,267,445, 79)
16:29:08. 145 appforipad [7206: 207] keyname: More-Key Frame: (729,267,200, 79)
16:29:08. 151 appforipad [7206: 207] keyname: Dismiss-Key Frame: (937,267)
16:29:08. 152 appforipad [7206: 207] keyname: Return-Key Frame)
16:29:08. 153 appforipad [7206: 207] keyname: Shift-Key Frame: (4,181)
16:29:08. 158 appforipad [7206: 207] keyname: Shift-Key Frame: (909,181,111, 79)
16:29:11. 168 appforipad [7206: 207] keyname: digit-1 frame)
16:29:11. 169 appforipad [7206: 207] keyname: digit-2 frame)
16:29:11. 170 appforipad [7206: 207] keyname: digit-3 frame)
16:29:11. 172 appforipad [7206: 207] keyname: digit-4 frame)
16:29:11. 173 appforipad [7206: 207] keyname: digit-5 frame)
16:29:11. 174 appforipad [7206: 207] keyname: digit-6 frame: (, 9)
16:29:11. 176 appforipad [7206: 207] keyname: digit-7 frame: (562,9)
16:29:11. 177 appforipad [7206: 207] keyname: digit-8 frame)
16:29:11. 178 appforipad [7206: 207] keyname: digit-9 frame: (, 9)
16:29:11. 179 appforipad [7206: 207] keyname: digit-0 frame: (84)
16:29:11. 181 appforipad [7206: 207] keyname: hyphen-minus frame: (, 95)
16:29:11. 181 appforipad [7206: 207] keyname: solidus frame)
16:29:11. 182 appforipad [7206: 207] keyname: Colon frame)
16:29:11. 183 appforipad [7206: 207] keyname: semicolon frame: (, 95)
16:29:11. 184 appforipad [7206: 207] keyname: Left-parenthesis frame: (random, 95)
16:29:11. 185 appforipad [7206: 207] keyname: Right-parenthesis frame: (502,95, 84,79)
16:29:11. 186 appforipad [7206: 207] keyname: Primary-currency-sign frame: (594,95, 84,79)
16:29:11. 187 appforipad [7206: 207] keyname: ampersand frame)
16:29:11. 187 appforipad [7206: 207] keyname: commercial-at frame)
16:29:11. 188 appforipad [7206: 207] keyname: full-stop frame: (276,181)
16:29:11. 188 appforipad [7206: 207] keyname: comma frame: (367,181)
16:29:11. 189 appforipad [7206: 207] keyname: Question-mark frame: (457,181)
16:29:11. 189 appforipad [7206: 207] keyname: Exclamation-mark frame: (548,181)
16:29:11. 191 appforipad [7206: 207] keyname: apostrophe frame: (638,181)
16:29:11. 191 appforipad [7206: 207] keyname: quotation-mark frame: (729,181)
16:29:11. 193 appforipad [7206: 207] keyname: delete-Key Frame: (934,9)
16:29:11. 193 appforipad [7206: 207] keyname: Undo-Key Frame: (95,181,173, 79)
16:29:11. 194 appforipad [7206: 207] keyname: More-Key Frame: (4,267,264, 79)
16:29:11. 195 appforipad [7206: 207] keyname: unlabeled-space-Key Frame: (276,267,445, 79)
16:29:11. 197 appforipad [7206: 207] keyname: More-Key Frame: (729,267,200, 79)
16:29:11. 198 appforipad [7206: 207] keyname: Dismiss-Key Frame: (937,267)
16:29:11. 198 appforipad [7206: 207] keyname: Return-Key Frame)
16:29:11. 200 appforipad [7206: 207] keyname: Shift-Key Frame: (4,181)
16:29:11. 201 appforipad [7206: 207] keyname: Shift-Key Frame: (909,181,111, 79)