// ==============================================
// Zboard Config Utility
// Copyright (C) 2007 Matt Razza
// ----------------------------------------------
// This file manages and interfaces with xModMap
// ==============================================

// Load header file
#include "zboard-xmodmap.h"

// ========================================================================
// Public Functions
// ========================================================================

// Binds a new settings file to the interface
bool mapInterface::bindNewFile(std::string sFile)
{
	std::string sCommand = "xmodmap ";
	int iRet;
	
	sCommand += sFile;
	iRet = system(sCommand.c_str());
	
	return !iRet;
}

// Exicutes a string into xModMap
bool mapInterface::bindString(std::string sString)
{
	std::string sCommand = "xmodmap -e ";
	int iRet;
	
	sCommand += sString;
	iRet = system(sCommand.c_str());
	
	return !iRet;
}
