--- old/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m 2020-09-01 17:35:50.000000000 +0530 +++ new/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m 2020-09-01 17:35:50.000000000 +0530 @@ -1335,7 +1335,7 @@ NSTextInputContext *curContxt = [NSTextInputContext currentInputContext]; kbdLayout = curContxt.selectedKeyboardInputSource; - [[NSNotificationCenter defaultCenter] addObserver:self + [[NSNotificationCenter defaultCenter] addObserver:[AWTView class] selector:@selector(keyboardInputSourceChanged:) name:NSTextInputContextKeyboardSelectionDidChangeNotification object:nil];