Is still work in progress, but you can test it:
' --------------------------
' Define colors
' --------------------------
bl=RGB(blue)
gr=RGB(green)
bk=RGB(black)
wt=RGB(white)
gy=RGB(gray)
rd=RGB(red)
' --------------------------
' UI box dimensions
' --------------------------
Dim x(3), y(2)
w=73
h=68
x(0)=10 : x(1)=85 : x(2)=160 : x(3)=235
y(0)=110 : y(1)=180 : y(2)=250
' --------------------------
' Define function labels
' --------------------------
Dim fun$(2,3)
fun$(0,0)="e" : fun$(0,1)="pi" : fun$(0,2)="%" : fun$(0,3)="ANS"
fun$(1,0)="log" : fun$(1,1)="ln" : fun$(1,2)="x^y" : fun$(1,3)="x!"
fun$(2,0)="sqrt" : fun$(2,1)="sin(x)" : fun$(2,2)="cos(x)": fun$(2,3)="tg(x)"
' --------------------------
' Draw initial UI
' --------------------------
CLS
Box 0, 0, 320, 320, , bk, bk
Box 10, 10, 298, 80, 2, gr, wt
For r=0 To 2
For c=0 To 3
Box x(c), y(r), w, h, 2, wt, gy
Text x(c)+w/2, y(r)+h/2, fun$(r,c), "CM",,,wt,gy
Next
Next
' --------------------------
' Get user input
' --------------------------
Color rd, wt
Text 20, 60, ">", "LT",,, rd, wt
Input "", input$
'input$=TRIM$(input$)
' --------------------------
' Selection logic
' --------------------------
r=0 : c=0
editing%=1
Do While editing%
' Highlight current box
Box x(c), y(r), w, h, 2, gr, gy
Text x(c)+w/2, y(r)+h/2, fun$(r,c), "CM",,,gr,gy
a$=Inkey$
If a$<>"" Then
' Remove highlight
Box x(c), y(r), w, h, 2, wt, gy
Text x(c)+w/2, y(r)+h/2, fun$(r,c), "CM",,,wt,gy
Select Case a$
Case Chr$(130) : If c>0 Then c=c-1 ' Left
Case Chr$(131) : If c<3 Then c=c+1 ' Right
Case Chr$(128) : If r>0 Then r=r-1 ' Up
Case Chr$(129) : If r<2 Then r=r+1 ' Down
Case Chr$(27) : editing%=0 ' ESC to exit
Case Chr$(13) ' Enter to apply function
On ERROR SKIP
Select Case fun$(r,c)
Case "e" : result=Exp(1)
Case "pi" : result=Pi
Case "%" : result=Eval(input$)/100
Case "ANS" : ' just show previous result again
Case "log" : result=LOG10(Eval(input$))
Case "ln" : result=Log(Eval(input$))
Case "x^y" : result=Eval(input$) ' expecting expression like 2^3
Case "x!" : result=FACT(Eval(input$))
Case "sqrt" : result=Sqr(Eval(input$))
Case "sin(x)" : result=Sin(Eval(input$))
Case "cos(x)" : result=Cos(Eval(input$))
Case "tg(x)" : result=Tan(Eval(input$))
End Select
On ERROR ABORT
' Redraw result box
Box 10, 10, 298, 80, 2, gr, wt
Text 20, 60, Str$(result), "LT",,, rd, wt
End Select
EndIf
Pause 200
Loop
' --------------------------
' Exit and reset screen
' --------------------------
Color gr, bk
CLS bk