Files
Newton-Editor/src/libs/dto/code/register_command_event.py
itdominator 608699c431 refactor(command-system): standardize command execution with *args/**kwargs
- Refactor exec_with_args to use *args/**kwargs instead of tuple arguments
- Add *args/**kwargs to all command execute functions for consistency
- Support multiple key bindings per command in registration
- Add character-based key binding support via get_char() in KeyMapper
- Make execute_plugin async and use asyncio.run for plugin execution
- Use MIME type from Gio content_type instead of language for ftype
2026-02-24 22:30:44 -06:00

21 lines
390 B
Python

# Python imports
from dataclasses import dataclass, field
# Lib imports
import gi
gi.require_version('GtkSource', '4')
from gi.repository import GtkSource
# Application imports
from ..base_event import BaseEvent
@dataclass
class RegisterCommandEvent(BaseEvent):
command_name: str = ""
command: callable = None
binding_mode: str = ""
binding: str or list = ""