mirror of
https://github.com/glfw/glfw.git
synced 2024-11-29 13:32:01 +00:00
Fixed clipboard test OS X modifier.
This commit is contained in:
parent
5b6e67119f
commit
9021e52a6f
@ -34,6 +34,12 @@
|
|||||||
|
|
||||||
#include "getopt.h"
|
#include "getopt.h"
|
||||||
|
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
#define MODIFIER GLFW_MOD_SUPER
|
||||||
|
#else
|
||||||
|
#define MODIFIER GLFW_MOD_CONTROL
|
||||||
|
#endif
|
||||||
|
|
||||||
static void usage(void)
|
static void usage(void)
|
||||||
{
|
{
|
||||||
printf("Usage: clipboard [-h]\n");
|
printf("Usage: clipboard [-h]\n");
|
||||||
@ -56,7 +62,7 @@ static void key_callback(GLFWwindow* window, int key, int scancode, int action,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case GLFW_KEY_V:
|
case GLFW_KEY_V:
|
||||||
if (mods == GLFW_MOD_CONTROL)
|
if (mods == MODIFIER)
|
||||||
{
|
{
|
||||||
const char* string;
|
const char* string;
|
||||||
|
|
||||||
@ -69,7 +75,7 @@ static void key_callback(GLFWwindow* window, int key, int scancode, int action,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case GLFW_KEY_C:
|
case GLFW_KEY_C:
|
||||||
if (mods == GLFW_MOD_CONTROL)
|
if (mods == MODIFIER)
|
||||||
{
|
{
|
||||||
const char* string = "Hello GLFW World!";
|
const char* string = "Hello GLFW World!";
|
||||||
glfwSetClipboardString(window, string);
|
glfwSetClipboardString(window, string);
|
||||||
|
Loading…
Reference in New Issue
Block a user