Currently, input and output are bundled together, this make it quite difficult to extend.
Input: Keyboard, Serial Output: Text mode, Video mode Now, the binding is fixed using individual module: Keyboard + Text = console Keyboard + Video = gfxterm Serial + Text = serial Serial + Video = ? And there are mixing as well. If we separate them, it would make things much clear. For example, the grub_term structure can be split into two mutually exclusive parts: struct grub_term = { .name, .init, .fini, .putchar, .getcharwidth, .checkkey, .getkey, .getwh, .getxy, .gotoxy, .cls, .setcolorstate, .setcursor, .flags, .next }; => struct grub_input { .name, .init, .fini, .checkkey, .getkey .flags, .next } + struct grub_output { .name, .init, .fini, .putchar, .getcharwidth, .getxy, .gotoxy, .cls, .setcolorstate, .setcursor, .flags, .next } Integration between input and output: Input driver <=> console driver <=> Output driver The console driver is the central part. It accepts virtual key from the input driver, and write to the virtual screen provided by output driver. -- Bean _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel