ConsoleUser

Copyright (c) 2010-2023 Skaion Corporarion, www.skaion.com

This project was developed in part by numerous sponsorships from the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints of Governmental purposes notwithstanding any copyright notation thereon.

All content reflects those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government or Skaion Corporation.

class KeyboardStrategy.KeyboardStrategy(config)

I am the abstract parent class of all KeyboardStrategies. Combined with my subclasses I help implement the Strategy Pattern.

Parameters:

type_and_verify_str(msg, start_x, start_y, font, system)

Type the message on the remote system, translating any meta keys in the message, and verify that each character shows up as expected.

Parameters:

  • msg: the formatted string to type

  • start_x: the X coordinate at which the first char will appear

  • start_y: the Y coordinate at which the first char will appear

  • font: the <no title> in which the characters will be rendered

  • system: a <no title> object controlling the remote system

type_str(msg, system)

Type the given string, translating any meta characters.

Parameters:

  • msg: the formatted string to type

  • system: a <no title> object controlling the remote system

up_all_mod_keys(system)

Send an “up” to all the modifier keys, just in case any were still down from a previous action.

Parameters:

  • system: a <no title> object controlling the remote system

KeyboardStrategy.get_keyboard_strategy(config)

This is the Factory method to create instances of the KeyboardStrategy.

Parameters:

  • config: a <no title> object that includes information about the <no title> the current user will use

Return: an instance of <no title> of the appropriate class