How to create a button to emulate key press of Shift, Crtl or Alt?

Hi all,
I’m very new to python but I’m trying to make my sculpting in Blender on a tablet less painful.

Im trying to find out how to get keyboard buttons on the header panel that functions as “Shift”, “Ctrl” and “Alt”. I thought it would be easy to find but it seems blender like its tricker. The idea is for example, I can rotate with pen and hold the “Shift button” with a finger.

I have this previously hacked header buttons script, I was wondering if anyone could direct me what to put in the “layout.operator” to create these buttons?

Thanks! :eyebrowlift:

bl_info = {
    "name": "View Control Header Buttons",
    "category": "3D View",
}

import bpy
import os

class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    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):
        self.report({'INFO'}, "Button clicked!")
        return {'FINISHED'}


def draw_func(self, context):
    layout = self.layout
    layout.operator*****************
 


def register():
    bpy.utils.register_class(SimpleOperator)
    bpy.types.VIEW3D_HT_header.append(draw_func)


def unregister():
    bpy.utils.unregister_class(SimpleOperator)
    bpy.types.VIEW3D_HT_header.remove(draw_func)


if __name__ == "__main__":
    register()