MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / _move_callback

Method _move_callback

PySimpleGUI/PySimpleGUI.py:11421–11439  ·  view source on GitHub ↗

Called when a control + arrow key is pressed. This is a built-in window positioning key sequence :param event: From tkinter and is not used :type event: Any

(self, event)

Source from the content-addressed store, hash-verified

11419 _exit_mainloop(self, None)
11420
11421 def _move_callback(self, event):
11422 """
11423 Called when a control + arrow key is pressed.
11424 This is a built-in window positioning key sequence
11425
11426 :param event: From tkinter and is not used
11427 :type event: Any
11428 """
11429 if not self._is_window_created('Tried to move window using arrow keys'):
11430 return
11431 x,y = self.current_location()
11432 if event.keysym == 'Up':
11433 self.move(x, y-1)
11434 elif event.keysym == 'Down':
11435 self.move(x, y+1)
11436 elif event.keysym == 'Left':
11437 self.move(x-1, y)
11438 elif event.keysym == 'Right':
11439 self.move(x+1, y)
11440
11441 """
11442 def _config_callback(self, event):

Callers

nothing calls this directly

Calls 3

_is_window_createdMethod · 0.95
current_locationMethod · 0.95
moveMethod · 0.95

Tested by

no test coverage detected