(while (setq r
(PromptWithMatrixButtons
"Pseudo Virtual Keyboard" nil (List
->SquareMatrixList
10 (mapcar '
chr (vl
-string
->list "ABCDEFGHIJKLMNOPQRSTUVWXYZ -+=1234567890*/.'"))))) )
)
; (PromptWithMatrixButtons "Your favourite letter" nil (List->SquareMatrixList 4 (mapcar 'chr (vl-string->list "ABCDEFGHIJKLMNOPQRSTUVWXYZ"))))
_$
(List
->SquareMatrixList
4 (mapcar '
chr (vl
-string
->list "ABCDEFGHIJKLMNOPQRSTUVWXYZ")))(("A" "B" "C" "D")
("E" "F" "G" "H")
("I" "J" "K" "L")
("M" "N" "O" "P")
("Q" "R" "S" "T")
("U" "V" "W" "X")
("Y" "Z" nil nil)
)
; (List->SquareMatrixList 4 (mapcar 'chr (vl-string->list "ABCDEFGHIJKLMNOPQRSTUVWXYZ")))
; L - input list
; n - square's size (in items)
; Returns a matrix list NxN ( the empty items are filled with nil's )
(defun List
->SquareMatrixList
( n L
/ tmp rtn
) )
); defun List->SquareMatrixList
; (PromptWithMatrixButtons "Your favourite letter" nil (List->SquareMatrixList2 4 (mapcar 'chr (vl-string->list "ABCDEFGHIJKLMNOPQRSTUVWXYZ"))))
_$
(List
->SquareMatrixList2
4 (mapcar '
chr (vl
-string
->list "ABCDEFGHIJKLMNOPQRSTUVWXYZ")))(("A" "E" "I" "M" "Q" "U" "Y")
("B" "F" "J" "N" "R" "V" "Z")
("C" "G" "K" "O" "S" "W" nil)
("D" "H" "L" "P" "T" "X" nil)
)
; (List->SquareMatrixList2 4 (mapcar 'chr (vl-string->list "ABCDEFGHIJKLMNOPQRSTUVWXYZ")))
; L - input list
; n - square's size (in items)
; Returns a matrix list NxN ( the empty items are filled with nil's )
(defun List
->SquareMatrixList2
( n L
/ tmp rtn
) )
); defun List->SquareMatrixList2