如何设置一个虚拟键盘?

2019-07-20 23:21发布

在屏上已经画好了一个虚拟键盘。//键盘表const u8* kbd_tbl1[18]={"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","DEL","OK"};
void jp_load_ui(u16 x,u16 y)//加载键盘界面,(x,y:界面起始坐标)
{
        u16 i;
        POINT_COLOR=RED;
        LCD_DrawRectangle(x,y,x+360,y+120);                // 画键盘边框          
        LCD_DrawRectangle(x+60,y,x+120,y+120);
        LCD_DrawRectangle(x+120,y,x+180,y+120);
        LCD_DrawRectangle(x+180,y,x+240,y+120);
        LCD_DrawRectangle(x+240,y,x+300,y+120);
        LCD_DrawRectangle(x,y+40,x+360,y+80);
        POINT_COLOR=BLUE;
        for(i=0;i<18;i++)
        {
                Show_Str_Mid(x+(i%6)*60,y+4+40*(i/6),(u8*)kbd_tbl1[i],16,60);                       
        }                                                             
}
如何获取键值并将其显示在屏上?


友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。