-
-
Save omz/4da31445f14b7d5ae86904a855463359 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
This is a script that you can run in the current App Store version | |
of Pythonista (once per session) if you have an iPad Pro, and are | |
suffering from the "extended keys covering the console text" bug. | |
You'll have to kill the app from the app switcher, in order to | |
restore the default state (on-screen key row) | |
''' | |
from objc_util import * | |
UIApp = ObjCClass('UIApplication') | |
import console | |
@on_main_thread | |
def main(): | |
app = UIApp.sharedApplication() | |
cvc = app.windows()[0].rootViewController().accessoryViewController().consoleViewController() | |
tv = cvc.promptEditorView().textView() | |
item = tv.inputAssistantItem() | |
item.setTrailingBarButtonGroups_([]) | |
item.setLeadingBarButtonGroups_([]) | |
console.hud_alert('Extra console keys removed') | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment