#define KBMAPSIZE 0x20
#define KBMAPGET 0x21
#define VTSIZE 0x22
-#define KBSETTRANS 0x23
+#define KBSETTRANS (0x23|IOCTL_SUPER)
#define VTATTRS 0x24
+#define KBRATE 0x25
/* Fuzix systems to level 2 have 256 byte tty buffers as per standards, level 1
boxes may not */
signed char ncursory;
};
+struct vt_repeat {
+ uint8_t first;
+ uint8_t continual;
+};
+
/* Core functions */
void vtoutput(unsigned char *p, unsigned int len);
void vtinit(void);
void do_beep(void);
int vt_ioctl(uint8_t minor, uarg_t op, char *ptr);
int vt_inproc(uint8_t minor, unsigned char c);
-void vtattr_notify( void );
+void vtattr_notify(void);
extern uint8_t vtattr_cap;
extern uint8_t vtink;
extern uint8_t vtpaper;
+extern struct vt_repeat keyrepeat;
#endif
case KBMAPGET:
return uput(keymap, data, sizeof(keymap));
case KBSETTRANS:
- if (esuper())
- return -1;
if (uget(keyboard, data, sizeof(keyboard)) == -1)
return -1;
return uget(shiftkeyboard,
data + sizeof(keyboard),
sizeof(shiftkeyboard));
+ case KBRATE:
+ if (uget(&keyrepeat, data, sizeof(keyrepeat)) == -1)
+ return -1;
+ keyrepeat.first *= (TICKSPERSEC/10);
+ keyrepeat.continual *= (TICKSPERSEC/10);
+ return 0;
#endif
case VTSIZE:
return VT_HEIGHT << 8 | VT_WIDTH;