Lines Matching defs:key

386 				int32 key;
387 if (message->FindInt32("key", &key) == B_OK)
388 _FlashKey(key, 0);
550 CalcKey* key = fKeypad;
568 if (key->flags != 0)
578 be_control_look->DrawLabel(this, key->label, frame, updateRect,
582 key++;
637 // process key press
638 int key = gridRow * fColumns + gridCol;
639 _FlashKey(key, FLAGS_MOUSE_DOWN);
640 _PressKey(key);
675 // translate to evaluate key
681 // translate to backspace key
688 // translate to clear key
975 int32 key = _KeyForLabel(temp.String());
976 if (key >= 0)
977 _FlashKey(key, FLAGS_FLASH_KEY);
1214 CalcKey* key = fKeypad;
1221 strlcpy(key->label, B_TRANSLATE_NOCOLLECT(p), sizeof(key->label));
1225 strlcpy(key->code, "\n", sizeof(key->code));
1227 strlcpy(key->code, p, sizeof(key->code));
1230 if (strlen(key->label) == 1)
1231 strlcpy(key->keymap, key->label, sizeof(key->keymap));
1233 *key->keymap = '\0';
1235 key->flags = 0;
1239 fExpressionTextView->AddKeypadLabel(key->label);
1242 key++;
1248 CalcView::_PressKey(int key)
1253 assert(key < (fRows * fColumns));
1254 assert(key >= 0);
1256 if (strcmp(fKeypad[key].code, "BS") == 0) {
1259 } else if (strcmp(fKeypad[key].code, "C") == 0) {
1262 } else if (strcmp(fKeypad[key].code, "acos") == 0
1263 || strcmp(fKeypad[key].code, "asin") == 0
1264 || strcmp(fKeypad[key].code, "atan") == 0
1265 || strcmp(fKeypad[key].code, "cbrt") == 0
1266 || strcmp(fKeypad[key].code, "ceil") == 0
1267 || strcmp(fKeypad[key].code, "cos") == 0
1268 || strcmp(fKeypad[key].code, "cosh") == 0
1269 || strcmp(fKeypad[key].code, "exp") == 0
1270 || strcmp(fKeypad[key].code, "floor") == 0
1271 || strcmp(fKeypad[key].code, "log") == 0
1272 || strcmp(fKeypad[key].code, "ln") == 0
1273 || strcmp(fKeypad[key].code, "sin") == 0
1274 || strcmp(fKeypad[key].code, "sinh") == 0
1275 || strcmp(fKeypad[key].code, "sqrt") == 0
1276 || strcmp(fKeypad[key].code, "tan") == 0
1277 || strcmp(fKeypad[key].code, "tanh") == 0) {
1278 int32 labelLen = strlen(fKeypad[key].code);
1284 fExpressionTextView->Insert(startSelection, fKeypad[key].code,
1295 fExpressionTextView->Insert(fKeypad[key].code);
1303 } else if (strcmp(fKeypad[key].code, ".") == 0) {
1310 if (fKeypad[key].code[0] == '\n') {
1314 fExpressionTextView->Insert(fKeypad[key].code);
1323 int32 key = _KeyForLabel(label);
1324 if (key >= 0)
1325 _PressKey(key);
1343 CalcView::_FlashKey(int32 key, uint32 flashFlags)
1349 fKeypad[key].flags |= flashFlags;
1351 fKeypad[key].flags = 0;
1354 if (fKeypad[key].flags == FLAGS_FLASH_KEY) {
1356 message.AddInt32("key", key);