I adjusted the template of "operator_simple.py" to do the switching into edit mode followed by the activation of "vertex" selection mode. This is by no means a perfect solution as i already mentioned in the comment, but as you asked, and i said it's possible, here the proof.
Above i deactivated the 1 shortcut key and added a new one instead.
In the new one i called the "object.simple_operator" without ()!
And assigned the 1 key to it, afterwards i made sure the edit mode is not already in vertex mode to show the functionality of the code.
With the Screencast Keys active you can see the 1 showing up at the lower left side when i press the 1 in the 3D View while in Object Mode. The result is the change to Edit Mode and vertex selection chosen in one go.
While this works as long as the script is used once in blender, or is registered to be executed on startup of blender, you would need 3 of these for each key ( 1 vertex, 2 edge, 3 faces). If you want you can even make it an addon by adding some more code to the top like in the code below.
bl_info = {
"name": "Mode Switcher",
"author": "Your Name Here",
"version": (1, 0),
"blender": (2, 80, 0),
"location": "F3->simple_operator",
"description": "Combines the switching to Edit Mode with activation of vertex select mode",
"warning": "",
"wiki_url": "",
"category": "mode",
}
import bpy
def main(context):
# switch to edit mode
bpy.ops.object.mode_set(mode='EDIT', toggle=False)
# activate vertex selection ( vertex, edge, face) possible to activate all or 2 as well
bpy.context.tool_settings.mesh_select_mode = (True, False, False)
class SimpleOperator(bpy.types.Operator):
"""Change to edit mode and activate vertex select"""
bl_idname = "object.simple_operator"
bl_label = "Simple Object Operator"
@classmethod
def poll(cls, context):
return context.active_object is not None
def execute(self, context):
main(context)
return {'FINISHED'}
def register():
bpy.utils.register_class(SimpleOperator)
def unregister():
bpy.utils.unregister_class(SimpleOperator)
if __name__ == "__main__":
register()
# test call
bpy.ops.object.simple_operator()
This here does not include the naming and such, there sure is a lot that can be done.
But the point is, it's possible, to which extend you want to change the workflow to be more close to what you are used to, that is essentially up to you. Please use separate names for the addon if you use this, i only used the template to explain it fast.